ID,Name,Weakness Abstraction,Status,Description,Extended Description,Related Weaknesses,Weakness Ordinalities,Applicable Platforms,Background Details,Alternate Terms,Modes Of Introduction,Exploitation Factors,Likelihood of Exploit,Common Consequences,Detection Methods,Potential Mitigations,Observed Examples,Functional Areas,Affected Resources,Taxonomy Mappings,Related Attack Patterns,Notes 1004,"Sensitive Cookie Without 'HttpOnly' Flag",Variant,Incomplete,"The software uses a cookie to store sensitive information, but the cookie is not marked with the HttpOnly flag.","The HttpOnly flag directs compatible browsers to prevent client-side script from accessing cookies. Including the HttpOnly flag in the Set-Cookie HTTP response header helps mitigate the risk associated with Cross-Site Scripting (XSS) where an attacker's script code might attempt to read the contents of a cookie and exfiltrate information obtained. When set, browsers that support the flag will not reveal the contents of the cookie to a third party via client-side script executed via XSS.","::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::PARADIGN NAME:Web Based:PARADIGN PREVALENCE:Undetermined::TECHNOLOGY NAME:Web Server:TECHNOLOGY PREVALENCE:Undetermined::","::An HTTP cookie is a small piece of data attributed to a specific website and stored on the user's computer by the user's web browser. This data can be leveraged for a variety of purposes including saving information entered into form fields, recording user activity, and for authentication purposes. Cookies used to save or record information generated by the user are accessed and modified by script code embedded in a web page. While cookies used for authentication are created by the website's server and sent to the user to be attached to future requests. These authentication cookies are often not meant to be accessed by the web page sent to the user, and are instead just supposed to be attached to future requests to verify authentication details.::","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Architecture and Design:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Application Data:NOTE:Confidentiality Read Application Data If the HttpOnly flag is not set, then sensitive information stored in the cookie may be exposed to unintended parties.::SCOPE:Integrity:TECHNICAL IMPACT:Gain Privileges or Assume Identity:NOTE:Integrity Gain Privileges or Assume Identity If the cookie in question is an authentication cookie, then not setting the HttpOnly flag may allow an adversary to steal authentication data (e.g., a session ID) and assume the identity of the user.::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS:High:DESCRIPTION:Leverage the HttpOnly flag when setting a sensitive cookie in a response.::","::REFERENCE:CVE-2014-3852:DESCRIPTION:CMS written in Python does not include the HTTPOnly flag in a Set-Cookie header, allowing remote attackers to obtain potentially sensitive information via script access to this cookie.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3852REFERENCE:CVE-2015-4138:DESCRIPTION:Appliance for managing encrypted communications does not use HttpOnly flag.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-4138","","","","","", 1007,"Insufficient Visual Distinction of Homoglyphs Presented to User",Base,Incomplete,"The software displays information or identifiers to a user, but the display mechanism does not make it easy for the user to distinguish between visually similar or identical glyphs (homoglyphs), which may cause the user to misinterpret a glyph and perform an unintended, insecure action.","Some glyphs, pictures, or icons can be semantically distinct to a program, while appearing very similar or identical to a human user. These are referred to as homoglyphs. For example, the lowercase l (ell) and uppercase I (eye) have different character codes, but these characters can be displayed in exactly the same way to a user, depending on the font. This can also occur between different character sets. For example, the Latin capital letter A and the Greek capital letter Α (Alpha) are treated as distinct by programs, but may be displayed in exactly the same way to a user. Accent marks may also cause letters to appear very similar, such as the Latin capital letter grave mark À and its equivalent À with the acute accent. Adversaries can exploit this visual similarity for attacks such as phishing, e.g. by providing a link to an attacker-controlled hostname that looks like a hostname that the victim trusts. In a different use of homoglyphs, an adversary may create a back door username that is visually similar to the username of a regular user, which then makes it more difficult for a system administrator to detect the malicious username while reviewing logs.","::NATURE:ChildOf:CWE ID:451:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:451:VIEW ID:1000:ORDINAL:Primary::","::ORDINALITY:Resultant:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::PARADIGN NAME:Web Based:PARADIGN PREVALENCE:Sometimes::TECHNOLOGY NAME:Web Server:TECHNOLOGY PREVALENCE:Sometimes::","","::TERM:Homograph Attack:DESCRIPTION:Homograph is often used as a synonym of homoglyph by researchers, but according to Wikipedia, a homograph is a word that has multiple, distinct meanings.::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:TECHNICAL IMPACT:Other:NOTE:Integrity Confidentiality Other An attacker may ultimately redirect a user to a malicious website, by deceiving the user into believing the URL they are accessing is a trusted domain. However, the attack can also be used to forge log entries by using homoglyphs in usernames. Homoglyph manipulations are often the first step towards executing advanced attacks such as stealing a user's credentials, Cross-Site Scripting (XSS), or log forgery. If an attacker redirects a user to a malicious site, the attacker can mimic a trusted domain to steal account credentials and perform actions on behalf of the user, without the user's knowledge. Similarly, an attacker could create a username for a website that contains homoglyph characters, making it difficult for an admin to review logs and determine which users performed which actions.::","::METHOD:Manual Dynamic Analysis:EFFECTIVENESS:Moderate:DESCRIPTION:If utilizing user accounts, attempt to submit a username that contains homoglyphs. Similarly, check to see if links containing homoglyphs can be sent via email, web browsers, or other mechanisms.::","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use a browser that displays Punycode for IDNs in the URL and status bars, or which color code various scripts in URLs. Due to the prominence of homoglyph attacks, several browsers now help safeguard against this attack via the use of Punycode. For example, Mozilla Firefox and Google Chrome will display IDNs as Punycode if top-level domains do not restrict which characters can be used in domain names or if labels mix scripts for different languages.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use an email client that has strict filters and prevents messages that mix character sets to end up in a user's inbox. Certain email clients such as Google's GMail prevent the use of non-Latin characters in email addresses or in links contained within emails. This helps prevent homoglyph attacks by flagging these emails and redirecting them to a user's spam folder.::","::REFERENCE:CVE-2013-7236:DESCRIPTION:web forum allows impersonation of users with homoglyphs in account names:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7236REFERENCE:CVE-2012-0584:DESCRIPTION:Improper character restriction in URLs in web browser:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-0584REFERENCE:CVE-2009-0652:DESCRIPTION:Incomplete blacklist does not include homoglyphs of / and ? characters in URLs:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0652REFERENCE:CVE-2017-5015:DESCRIPTION:web browser does not convert hyphens to punycode, allowing IDN spoofing in URLs:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5015REFERENCE:CVE-2005-0233:DESCRIPTION:homoglyph spoofing using punycode in URLs and certificates:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0233REFERENCE:CVE-2005-0234:DESCRIPTION:homoglyph spoofing using punycode in URLs and certificates:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0234REFERENCE:CVE-2005-0235:DESCRIPTION:homoglyph spoofing using punycode in URLs and certificates:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0235","","","","::632::","", 102,"Struts: Duplicate Validation Forms",Variant,Incomplete,"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.","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.","::NATURE:ChildOf:CWE ID:694:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Duplicate Validation Forms::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 1021,"Improper Restriction of Rendered UI Layers or Frames",Base,Incomplete,"The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain, which can lead to user confusion about which interface the user is interacting with.","A web application is expected to place restrictions on whether it is allowed to be rendered within frames, iframes, objects, embed or applet elements. Without the restrictions, users can be tricked into interacting with the application when they were not intending to.","::NATURE:ChildOf:CWE ID:441:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:451:VIEW ID:699::NATURE:ChildOf:CWE ID:451:VIEW ID:1000::","","","","::TERM:Clickjacking:DESCRIPTION:::TERM:UI Redress Attack:DESCRIPTION:::TERM:Tapjacking:DESCRIPTION:Tapjacking is similar to clickjacking, except it is used for mobile applications in which the user taps the application instead of performing a mouse click.::",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Access Control:TECHNICAL IMPACT:Gain Privileges or Assume Identity Bypass Protection Mechanism Read Application Data Modify Application Data:NOTE:Access Control Gain Privileges or Assume Identity Bypass Protection Mechanism Read Application Data Modify Application Data An attacker can trick a user into performing actions that are masked and hidden from the user's view. The impact varies widely, depending on the functionality of the underlying application. For example, in a social media application, clickjacking could be used to trik the user into changing privacy settings.::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:The use of X-Frame-Options allows developers of web content to restrict the usage of their application within the form of overlays, frames, or iFrames. The developer can indicate from which domains can frame the content. The concept of X-Frame-Options is well documented, but implementation of this protection mechanism is in development to cover gaps. There is a need for whitelisting and allowing frames from multiple domains.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:A developer can use a frame-breaker script in each page that should not be framed. This is very helpful for legacy browsers that do not support X-Frame-Options security feature previously mentioned. It is also important to note that this tactic has been circumvented or bypassed. Improper usage of frames can persist in the web application through nested frames. The frame-breaking script does not intuitively account for multiple nested frames that can be presented to the user.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:This defense-in-depth technique can be used to prevent the improper usage of frames in web applications. It prioritizes the valid sources of data to be loaded into the application through the usage of declarative policies. Based on which implementation of Content Security Policy is in use, the developer should use the frame-ancestors directive or the frame-src directive to mitigate this weakness. Both directives allow for the placement of restrictions when it comes to allowing embedded content.::","::REFERENCE:CVE-2017-7440:DESCRIPTION:E-mail preview feature in a desktop application allows clickjacking attacks via a crafted e-mail message:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7440REFERENCE:CVE-2017-5697:DESCRIPTION:Hardware/firmware product has insufficient clickjacking protection in its web user interface:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5697REFERENCE:CVE-2017-4015:DESCRIPTION:Clickjacking in data-loss prevention product via HTTP response header.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-4015REFERENCE:CVE-2016-2496:DESCRIPTION:Tapjacking in permission dialog for mobile OS allows access of private storage using a partially-overlapping window.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2496REFERENCE:CVE-2015-1241:DESCRIPTION:Tapjacking in web browser related to page navigation and touch/gesture events.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-1241REFERENCE:CVE-2017-0492:DESCRIPTION:System UI in mobile OS allows a malicious application to create a UI overlay of the entire screen to gain privileges.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0492","","","","::103::506::","", 1022,"Use of Web Link to Untrusted Target with window.opener Access",Variant,Incomplete,"The web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property.","When a user clicks a link to an external site (target), the target=_blank attribute causes the target site's contents to be opened in a new window or tab, which runs in the same process as the original page. The window.opener object records information about the original page that offered the link. If an attacker can run script on the target page, then they could read or modify certain properties of the window.opener object, including the location property - even if the original and target site are not the same origin. An attacker can modify the location property to automatically redirect the user to a malicious site, e.g. as part of a phishing attack. Since this redirect happens in the original window/tab - which is not necessarily visible, since the browser is focusing the display on the new target page - the user might not notice any suspicious redirection.","::NATURE:ChildOf:CWE ID:266:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:266:VIEW ID:1000:ORDINAL:Primary::","","::LANGUAGE NAME:JavaScript:LANGUAGE PREVALENCE:Often::PARADIGN NAME:Web Based:PARADIGN PREVALENCE:Often::","","::TERM:tabnabbing:DESCRIPTION:::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Alter Execution Logic:NOTE:Confidentiality Alter Execution Logic The user may be redirected to an untrusted page that contains undesired content or malicious script code.::","","::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Specify in the design that any linked external document must not be granted access to the location object of the calling page.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:When creating a link to an external document using the tag with a defined target, for example _blank or a named frame, provide the rel attribute with a value noopener noreferrer. If opening the external document in a new window via javascript, then reset the opener by setting it equal to null.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Do not use _blank targets. However, this can affect the usability of your application.::","","","","","","", 1023,"Incomplete Comparison with Missing Factors",Base,Incomplete,"The software performs a comparison between entities that must consider multiple factors or characteristics of each entity, but the comparison does not include one or more of these factors. This can lead to resultant weaknesses, e.g. by operating on the wrong object.","","::NATURE:ChildOf:CWE ID:697:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:697:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Access Control:TECHNICAL IMPACT:Alter Execution Logic Bypass Protection Mechanism::","","::PHASE:Testing:STRATEGY::EFFECTIVENESS::DESCRIPTION:Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.::","","","","","","", 1024,"Comparison of Incompatible Types",Base,Incomplete,"The software performs a comparison between two entities, but the entities are of different, incompatible types that cannot be guaranteed to provide correct results when they are directly compared.","In languages that are strictly typed but support casting/conversion, such as C or C++, the programmer might assume that casting one entity to the same type as another entity will ensure that the comparison will be performed correctly, but this cannot be guaranteed. In languages that are not strictly typed, such as PHP or JavaScript, there may be implicit casting/conversion to a type that the programmer is unaware of, causing unexpected results; for example, the string 123 might be converted to a number type. See examples.","::NATURE:ChildOf:CWE ID:697:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:697:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:JavaScript:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:PHP:LANGUAGE PREVALENCE:Undetermined:::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Varies by Context::","","::PHASE:Testing:STRATEGY::EFFECTIVENESS::DESCRIPTION:Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.::","","","","","","", 1025,"Comparison Using Wrong Factors",Base,Incomplete,"The software performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities, which can lead to incorrect results and resultant weaknesses.","A common example of this weakness occurs when the code inadvertently extracts the reference to an object, instead of its relevant contents.","::NATURE:ChildOf:CWE ID:697:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:697:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Varies by Context::","","::PHASE:Testing:STRATEGY::EFFECTIVENESS::DESCRIPTION:Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.::","","","","","","", 103,"Struts: Incomplete validate() Method Definition",Variant,Draft,"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().","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.","::NATURE:ChildOf:CWE ID:573:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","::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.::","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Other Other 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.::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Confidentiality Integrity Availability Other Other 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.::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Implement the validate() method and call super.validate() within that method.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Erroneous validate() Method::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","TYPE:Relationship:NOTE:This could introduce other weaknesses related to missing input validation.::::TYPE:Maintenance:NOTE: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.::", 1037,"Processor Optimization Removal or Modification of Security-critical Code",Base,Incomplete,"The developer builds a security-critical protection mechanism into the software, but the processor optimizes the execution of the program such that the mechanism is removed or modified.","","::NATURE:ChildOf:CWE ID:1038:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:1038:VIEW ID:1000:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:This weakness does not depend on other weaknesses and is the result of choices made by the processor in executing the specified application.::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Rarely::","","",":::PHASE:Architecture and Design:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Bypass Protection Mechanism:NOTE:Integrity Bypass Protection Mechanism High A successful exploitation of this weakness will change the order of an application's execution and will likely be used to bypass specific protection mechanisms. This bypass can be exploited further to potentially read data that should otherwise be unaccessible.::","::METHOD:White Box:EFFECTIVENESS:Opportunistic:DESCRIPTION:In theory this weakness can be detected through the use of white box testing techniques where specifically crafted test cases are used in conjunction with debuggers to verify the order of statements being executed.::","","::REFERENCE:CVE-2017-5715:DESCRIPTION:Intel, ARM, and AMD processor optimizations related to speculative execution and branch prediction cause access control checks to be bypassed when placing data into the cache. Often known as Spectre.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5715REFERENCE:CVE-2017-5753:DESCRIPTION:Intel, ARM, and AMD processor optimizations related to speculative execution and branch prediction cause access control checks to be bypassed when placing data into the cache. Often known as Spectre.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5753REFERENCE:CVE-2017-5754:DESCRIPTION:Intel processor optimizations related to speculative execution cause access control checks to be bypassed when placing data into the cache. Often known as Meltdown.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5754","","","","","", 1038,"Insecure Automated Optimizations",Class,Draft,"The product uses a mechanism that automatically optimizes code, e.g. to improve a characteristic such as performance, but the optimizations can have an unintended side effect that might violate an intended security assumption.","","::NATURE:ChildOf:CWE ID:435:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:758:VIEW ID:1000::","::ORDINALITY:Primary:DESCRIPTION:This weakness does not depend on other weaknesses and is the result of choices made during optimization.::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Architecture and Design:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Alter Execution Logic:NOTE:Integrity Alter Execution Logic The optimizations alter the order of execution resulting in side effects that were not intended by the original developer.::","","","","","","","","", 1039,"Automated Recognition Mechanism with Inadequate Detection or Handling of Adversarial Input Perturbations",Class,Incomplete,"The product uses an automated mechanism such as machine learning to recognize complex data inputs (e.g. image or audio) as a particular concept or category, but it does not properly detect or handle inputs that have been modified or constructed in a way that causes the mechanism to detect a different, incorrect concept.","When techniques such as machine learning are used to automatically classify input streams, and those classifications are used for security-critical decisions, then any mistake in classification can introduce a vulnerability that allows attackers to cause the product to make the wrong security decision. If the automated mechanism is not developed or trained with enough input data, then attackers may be able to craft malicious input that intentionally triggers the incorrect classification. Targeted technologies include, but are not necessarily limited to: automated speech recognition automated image recognition For example, an attacker might modify road signs or road surface markings to trick autonomous vehicles into misreading the sign/marking and performing a dangerous action.","::NATURE:ChildOf:CWE ID:693:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:697:VIEW ID:1000::","::ORDINALITY:Primary:DESCRIPTION:This weakness does not depend on other weaknesses and is the result of choices made during optimization.::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Architecture and Design:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Bypass Protection Mechanism:NOTE:Integrity Bypass Protection Mechanism When the automated recognition is used in a protection mechanism, an attacker may be able to craft inputs that are misinterpreted in a way that grants excess privileges.::","","","","","","","","TYPE:Relationship:NOTE:Further investigation is needed to determine if better relationships exist or if additional organizational entries need to be created. For example, this issue might be better related to recognition of input as an incorrect type, which might place it as a sibling of CWE-704 (incorrect type conversion).::", 104,"Struts: Form Bean Does Not Extend Validation Class",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:573:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","::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.::","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Other Other 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.::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Confidentiality Integrity Availability Other Other 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.::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Ensure that all forms extend one of the Validation Classes.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Form Bean Does Not Extend Validation Class::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 105,"Struts: Form Field Without Validator",Variant,Draft,"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.","Omitting validation for even a single input field may give attackers the leeway they need to compromise the application. 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.","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::SCOPE:Integrity:TECHNICAL IMPACT:Bypass Protection Mechanism:NOTE:Integrity Bypass Protection Mechanism 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.::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Form Field Without Validator::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 106,"Struts: Plug-in Framework not in Use",Variant,Draft,"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.","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.","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE:Architecture and Design:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION:Use an input validation framework such as Struts.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use an input validation framework such as Struts.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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: Phone number fields contain only valid characters in phone numbers Boolean values are only T or F Free-form strings are of a reasonable length and composition::PHASE:Implementation:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION: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: Phone number fields contain only valid characters in phone numbers Boolean values are only T or F Free-form strings are of a reasonable length and composition::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Plug-in Framework Not In Use::","","", 107,"Struts: Unused Validation Form",Variant,Draft,"An unused validation form indicates that validation logic is not up-to-date.","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.","::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Resultant:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Quality Degradation::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Remove the unused Validation Form from the validation.xml file.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Unused Validation Form::","","", 108,"Struts: Unvalidated Action Form",Variant,Incomplete,"Every Action Form must have a corresponding validation form.","If a Struts Action Form Mapping specifies a form, it must have a validation form defined under the Struts Validator.","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Other Other 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.::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Confidentiality Integrity Availability Other Other 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.::","","::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION:Map every Action Form to a corresponding validation form. 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.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Unvalidated Action Form::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 109,"Struts: Validator Turned Off",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Access Control:TECHNICAL IMPACT:Bypass Protection Mechanism::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Ensure that an action form mapping enables validation. Set the validate field to true.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Validator Turned Off::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","TYPE:Other:NOTE: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 < with < and a > with >. 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.::", 11,"ASP.NET Misconfiguration: Creating Debug Binary",Variant,Draft,"Debugging messages help attackers learn about the system and plan a form of attack.","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.","::NATURE:ChildOf:CWE ID:215:VIEW ID:1000:ORDINAL:Primary::","","::LANGUAGE NAME:ASP.NET:LANGUAGE PREVALENCE:Undetermined::","::The debug attribute of the 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.::","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Application Data:NOTE:Confidentiality Read Application Data 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.::","","::PHASE:System Configuration:STRATEGY::EFFECTIVENESS::DESCRIPTION:Avoid releasing debug binaries into the production environment. Change the debug mode to false when the application is deployed into production.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:ASP.NET Misconfiguration: Creating Debug Binary::","","", 110,"Struts: Validator Without Form Field",Variant,Draft,"Validation fields that do not appear in forms they are associated with indicate that the validation logic is out of date.","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. 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.","::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Other:NOTE:Other Other 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.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:Moderate:DESCRIPTION:To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.::METHOD:Manual Static Analysis:EFFECTIVENESS:Moderate:DESCRIPTION:To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.::","","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Struts: Validator Without Form Field::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 111,"Direct Use of Unsafe JNI",Base,Draft,"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.","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.","::NATURE:ChildOf:CWE ID:695:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Access Control:TECHNICAL IMPACT:Bypass Protection Mechanism::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Implement error handling around the JNI call.::PHASE:Implementation:STRATEGY:Refactoring:EFFECTIVENESS::DESCRIPTION:Do not use JNI calls if you don't trust the native library.::PHASE:Implementation:STRATEGY:Refactoring:EFFECTIVENESS::DESCRIPTION:Be reluctant to use JNI calls. A Java API equivalent may exist.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Unsafe JNI::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:SEC08-J:ENTRY NAME:Define wrappers around native methods::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP3:ENTRY NAME:Use of an improper API::","","", 112,"Missing XML Validation",Base,Draft,"The software accepts XML from an untrusted source but does not validate the XML against the proper schema.","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.","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE:Architecture and Design:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION:Always validate XML input against a known XML Schema or DTD. It is not possible for an XML parser to validate all aspects of a document's content because 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.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Missing XML Validation::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::230::231::484::99::","", 113,"Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')",Base,Incomplete,"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.","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. HTTP response splitting weaknesses may be present when: Data enters a web application through an untrusted source, most frequently an HTTP request. The data is included in an HTTP response header sent to a web user without being validated for malicious characters.","::NATURE:ChildOf:CWE ID:93:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:93:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:79:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Access Control:TECHNICAL IMPACT:Modify Application Data Gain Privileges or Assume Identity:NOTE:Integrity Access Control Modify Application Data Gain Privileges or Assume Identity 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.::","","::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION:Construct HTTP headers very carefully, avoiding the use of non-validated input data.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2004-2146:DESCRIPTION:Application accepts CRLF in an object ID, allowing HTTP response splitting.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2146REFERENCE:CVE-2004-1620:DESCRIPTION:HTTP response splitting via CRLF in parameter related to URL.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1620REFERENCE:CVE-2004-1656:DESCRIPTION:HTTP response splitting via CRLF in parameter related to URL.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1656REFERENCE:CVE-2005-2060:DESCRIPTION:Bulletin board allows response splitting via CRLF in parameter.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2060REFERENCE:CVE-2005-2065:DESCRIPTION:Bulletin board allows response splitting via CRLF in parameter.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2065REFERENCE:CVE-2004-2512:DESCRIPTION:Response splitting via CRLF in PHPSESSID.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2512REFERENCE:CVE-2005-1951:DESCRIPTION:Chain: Application accepts CRLF in an object ID, allowing HTTP response splitting.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1951REFERENCE:CVE-2004-1687:DESCRIPTION:Chain: HTTP response splitting via CRLF in parameter related to URL.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1687","","","TAXONOMY NAME:PLOVER:ENTRY NAME:HTTP response splitting::::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:HTTP Response Splitting::::TAXONOMY NAME:WASC:ENTRY ID:25:ENTRY NAME:HTTP Response Splitting::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::31::34::85::","TYPE:Theoretical:NOTE:HTTP response splitting is probably only multi-factor in an environment that uses intermediaries.::", 114,"Process Control",Base,Incomplete,"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.","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.","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands::","","::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION: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.::","","","System Process::","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Process Control::","::108::","", 115,"Misinterpretation of Input",Base,Incomplete,"The software misinterprets an input, whether from an attacker or another product, in a security-relevant fashion.","","::NATURE:ChildOf:CWE ID:436:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:436:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","","::REFERENCE:CVE-2005-2225:DESCRIPTION:Product sees dangerous file extension in free text of a group discussion, disconnects all users.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2225REFERENCE:CVE-2001-0003:DESCRIPTION:Product does not correctly import and process security settings from another product.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0003","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Misinterpretation Error::","","TYPE:Research Gap:NOTE:This concept needs further study. It is likely a factor in several weaknesses, possibly resultant as well. Overlaps Multiple Interpretation Errors (MIE).::", 116,"Improper Encoding or Escaping of Output",Class,Draft,"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.","Improper encoding or escaping can allow attackers to change the commands that are sent to another component, inserting malicious commands instead. 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). 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.","::NATURE:ChildOf:CWE ID:707:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:707:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:74:VIEW ID:1000::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY NAME:Database Server:TECHNOLOGY PREVALENCE:Often::TECHNOLOGY NAME:Web Server:TECHNOLOGY PREVALENCE:Often::","","::TERM:Output Sanitization:DESCRIPTION:::TERM:Output Validation:DESCRIPTION:::TERM:Output Encoding:DESCRIPTION:::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Modify Application Data:NOTE:Integrity Modify Application Data The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:TECHNICAL IMPACT:Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Access Control Execute Unauthorized Code or Commands The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.::SCOPE:Confidentiality:TECHNICAL IMPACT:Bypass Protection Mechanism:NOTE:Confidentiality Bypass Protection Mechanism The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:Moderate:DESCRIPTION: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.::METHOD:Automated Dynamic Analysis:EFFECTIVENESS::DESCRIPTION: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.::","::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.::PHASE:Architecture and Design:STRATEGY:Parameterization:EFFECTIVENESS::DESCRIPTION: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. For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.::PHASE:Architecture and Design Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use input validation as a defense-in-depth measure to reduce the likelihood of output encoding errors (see CWE-20).::PHASE:Requirements:STRATEGY::EFFECTIVENESS::DESCRIPTION:Fully specify which encodings are required by components that will be communicating with each other.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2008-4636:DESCRIPTION:OS command injection in backup software using shell metacharacters in a filename; correct behavior would require that this filename could not be changed.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4636REFERENCE:CVE-2008-0769: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0769REFERENCE:CVE-2008-0005: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0005REFERENCE:CVE-2008-5573:DESCRIPTION:SQL injection via password parameter; a strong password might contain &:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5573REFERENCE:CVE-2008-3773:DESCRIPTION:Cross-site scripting in chat application via a message subject, which normally might contain & and other XSS-related characters.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3773REFERENCE:CVE-2008-0757:DESCRIPTION:Cross-site scripting in chat application via a message, which normally might be allowed to contain arbitrary content.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0757","","","TAXONOMY NAME:WASC:ENTRY ID:22:ENTRY NAME:Improper Output Handling::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:IDS00-J:ENTRY NAME:Sanitize untrusted data passed across a trust boundary::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:IDS05-J:ENTRY NAME:Use a subset of ASCII for file and path names::::TAXONOMY NAME:CERT Perl Secure Coding:ENTRY ID:IDS33-PL:ENTRY NAME:Sanitize untrusted data passed across a trust boundary:MAPPING FIT:Exact::","::104::73::81::85::","TYPE:Relationship:NOTE:This weakness is primary to all weaknesses related to injection (CWE-74) since the inherent nature of injection involves the violation of structured messages.::::TYPE:Relationship:NOTE: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. 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.::::TYPE:Terminology:NOTE: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.::::TYPE:Theoretical:NOTE:This is a data/directive boundary error in which data boundaries are not sufficiently enforced before it is sent to a different control sphere.::::TYPE:Research Gap:NOTE: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.::", 117,"Improper Output Neutralization for Logs",Base,Draft,"The software does not neutralize or incorrectly neutralizes output that is written to logs.","This can allow an attacker to forge log entries or inject malicious content into logs. Log forging vulnerabilities occur when: Data enters an application from an untrusted source. The data is written to an application or system log file.","::NATURE:ChildOf:CWE ID:116:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:116:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","::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.::","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Non-Repudiation:TECHNICAL IMPACT:Modify Application Data Hide Activities Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Non-Repudiation Modify Application Data Hide Activities Execute Unauthorized Code or Commands 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.::","","::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2006-4624:DESCRIPTION:Chain: inject fake log entries with fake timestamps using CRLF injection:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4624","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Log Forging::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::","::81::93::","", 118,"Incorrect Access of Indexable Resource ('Range Error')",Class,Incomplete,"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.","","","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Varies by Context::","","","","","","TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","::10::14::24::45::46::47::8::9::","", 119,"Improper Restriction of Operations within the Bounds of a Memory Buffer",Class,Usable,"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.","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. 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.","::NATURE:ChildOf:CWE ID:118:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:118:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Often:::LANGUAGE CLASS:Assembly:LANGUAGE PREVALENCE:Undetermined::","","::TERM:Memory Corruption:DESCRIPTION: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.::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Modify Memory:NOTE:Integrity Confidentiality Availability Execute Unauthorized Code or Commands Modify Memory 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), they can redirect a function pointer to their 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.::SCOPE:Availability:SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory):NOTE:Availability Confidentiality Read Memory DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) 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.::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory:NOTE:Confidentiality Read Memory 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.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:High:DESCRIPTION: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. 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.::METHOD:Automated Dynamic Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Automated Static Analysis - Binary or Bytecode:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode Quality Analysis Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis::METHOD:Manual Static Analysis - Binary or Bytecode:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies::METHOD:Dynamic Analysis with Automated Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners::METHOD:Dynamic Analysis with Manual Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer::METHOD:Manual Static Analysis - Source Code:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections)::METHOD:Automated Static Analysis - Source Code:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer Cost effective for partial coverage: Source Code Quality Analyzer::METHOD:Architecture or Design Review:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Formal Methods / Correct-By-Construction Cost effective for partial coverage: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)::","::PHASE:Requirements:STRATEGY:Language Selection:EFFECTIVENESS::DESCRIPTION:Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. 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. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.::PHASE:Build and Compilation:STRATEGY:Compilation or Build Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows. 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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Consider adhering to the following rules when allocating and managing an application's 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 accessing the buffer in a loop and make sure you are not in danger of writing past the allocated space. If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64].::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (NX) or its equivalent [REF-60] [REF-61].::PHASE:Implementation:STRATEGY::EFFECTIVENESS:Moderate:DESCRIPTION:Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.::","::REFERENCE:CVE-2009-2550:DESCRIPTION:Classic stack-based buffer overflow in media player using a long entry in a playlist:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2550REFERENCE:CVE-2009-2403:DESCRIPTION:Heap-based buffer overflow in media player using a long entry in a playlist:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2403REFERENCE:CVE-2009-0689:DESCRIPTION:large precision value in a format string triggers overflow:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0689REFERENCE:CVE-2009-0690:DESCRIPTION:negative offset value leads to out-of-bounds read:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0690REFERENCE:CVE-2009-1532:DESCRIPTION:malformed inputs cause accesses of uninitialized or previously-deleted objects, leading to memory corruption:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1532REFERENCE:CVE-2009-1528:DESCRIPTION:chain: lack of synchronization leads to memory corruption:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1528REFERENCE:CVE-2009-0558:DESCRIPTION:attacker-controlled array index leads to code execution:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0558REFERENCE:CVE-2009-0269:DESCRIPTION:chain: -1 value from a function call was intended to indicate an error, but is used as an array index instead.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0269REFERENCE:CVE-2009-0566:DESCRIPTION:chain: incorrect calculations lead to incorrect pointer dereference and memory corruption:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0566REFERENCE:CVE-2009-1350:DESCRIPTION:product accepts crafted messages that lead to a dereference of an arbitrary pointer:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1350REFERENCE:CVE-2009-0191:DESCRIPTION:chain: malformed input causes dereference of uninitialized memory:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0191REFERENCE:CVE-2008-4113:DESCRIPTION:OS kernel trusts userland-supplied length value, allowing reading of sensitive information:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4113REFERENCE:CVE-2003-0542:DESCRIPTION:buffer overflow involving a regular expression with a large number of captures:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0542REFERENCE:CVE-2017-1000121:DESCRIPTION:chain: unchecked message size metadata allows integer overflow (CWE-190) leading to buffer overflow (CWE-119).:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-1000121","","Memory::","TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A5:ENTRY NAME:Buffer Overflows:MAPPING FIT:Exact::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR00-C:ENTRY NAME:Understand how arrays work::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR30-C:ENTRY NAME:Do not form or use out-of-bounds pointers or array subscripts:MAPPING FIT:CWE More Abstract::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR38-C:ENTRY NAME:Guarantee that library functions do not form invalid pointers:MAPPING FIT:CWE More Abstract::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ENV01-C:ENTRY NAME:Do not make assumptions about the size of an environment variable::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:EXP39-C:ENTRY NAME:Do not access a variable through a pointer of an incompatible type:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO37-C:ENTRY NAME:Do not assume character data has been read::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:CWE More Abstract::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR32-C:ENTRY NAME:Do not pass a non-null-terminated character sequence to a library function that expects a string:MAPPING FIT:CWE More Abstract::::TAXONOMY NAME:WASC:ENTRY ID:7:ENTRY NAME:Buffer Overflow::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","::10::100::14::24::42::44::45::46::47::8::9::","TYPE:Applicable Platform:NOTE:It is possible in any programming languages without memory management support 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.::", 12,"ASP.NET Misconfiguration: Missing Custom Error Page",Variant,Draft,"An ASP .NET application must enable custom error pages in order to prevent attackers from mining information from the framework's built-in responses.","","::NATURE:ChildOf:CWE ID:756:VIEW ID:1000:ORDINAL:Primary::","","::LANGUAGE NAME:ASP.NET:LANGUAGE PREVALENCE:Undetermined::","::The mode attribute of the tag defines whether custom or default error pages are used.::","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Operation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Application Data:NOTE:Confidentiality Read Application Data Default error pages gives detailed information about the error that occurred, and should not be used in production environments. 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.::","","::PHASE:System Configuration:STRATEGY::EFFECTIVENESS::DESCRIPTION:Handle exceptions appropriately in source code. ASP .NET applications should be configured to use custom error pages instead of the framework default page.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Do not attempt to process an error or attempt to mask it.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Verify return values are correct and do not supply sensitive information about the system.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:ASP.NET Misconfiguration: Missing Custom Error Handling::","","", 120,"Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')",Base,Incomplete,"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.","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.","::NATURE:ChildOf:CWE ID:119:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:699:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:123:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Resultant:DESCRIPTION:::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined:::LANGUAGE CLASS:Assembly:LANGUAGE PREVALENCE:Undetermined::","","::TERM:buffer overrun:DESCRIPTION:Some prominent vendors and researchers use the term buffer overrun, but most people use buffer overflow.::TERM:Unbounded Transfer:DESCRIPTION:::",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Execute Unauthorized Code or Commands 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.::SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU):NOTE:Availability DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:High:DESCRIPTION: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. 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.::METHOD:Automated Dynamic Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Manual Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Automated Static Analysis - Binary or Bytecode:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis::METHOD:Manual Static Analysis - Binary or Bytecode:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies::METHOD:Dynamic Analysis with Automated Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners::METHOD:Dynamic Analysis with Manual Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer::METHOD:Manual Static Analysis - Source Code:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections)::METHOD:Automated Static Analysis - Source Code:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer::METHOD:Architecture or Design Review:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Formal Methods / Correct-By-Construction Cost effective for partial coverage: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)::","::PHASE:Requirements:STRATEGY:Language Selection:EFFECTIVENESS::DESCRIPTION:Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. 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. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.::PHASE:Build and Compilation:STRATEGY:Compilation or Build Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows. 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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Consider adhering to the following rules when allocating and managing an application's 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 accessing the buffer in a loop and make sure you are not in danger of writing past the allocated space. If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64].::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (NX) or its equivalent [REF-60] [REF-61].::PHASE:Build and Compilation Operation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS:Moderate:DESCRIPTION:Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.::PHASE:Architecture and Design:STRATEGY:Enforcement by Conversion:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening:EFFECTIVENESS::DESCRIPTION:Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. 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.::PHASE:Architecture and Design Operation:STRATEGY:Sandbox or Jail:EFFECTIVENESS:Limited:DESCRIPTION: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. 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. 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. Be careful to avoid CWE-243 and other weaknesses related to jails.::","::REFERENCE:CVE-2000-1094:DESCRIPTION:buffer overflow using command with long argument:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-1094REFERENCE:CVE-1999-0046:DESCRIPTION:buffer overflow in local program using long environment variable:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0046REFERENCE:CVE-2002-1337:DESCRIPTION:buffer overflow in comment characters, when product increments a counter for a > but does not decrement for <:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1337REFERENCE:CVE-2003-0595:DESCRIPTION:By replacing a valid cookie value with an extremely long string of characters, an attacker may overflow the application's buffers.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0595REFERENCE:CVE-2001-0191:DESCRIPTION:By replacing a valid cookie value with an extremely long string of characters, an attacker may overflow the application's buffers.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0191","::Memory Management","Memory::","TAXONOMY NAME:PLOVER:ENTRY NAME:Unbounded Transfer ('classic overflow')::::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Buffer Overflow::::TAXONOMY NAME:CLASP:ENTRY NAME:Buffer overflow::::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A1:ENTRY NAME:Unvalidated Input:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A5:ENTRY NAME:Buffer Overflows:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:Exact::::TAXONOMY NAME:WASC:ENTRY ID:7:ENTRY NAME:Buffer Overflow::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","::10::100::14::24::42::44::45::46::47::67::8::9::92::","TYPE:Relationship:NOTE: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.::::TYPE:Terminology:NOTE: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.::", 121,"Stack-based Buffer Overflow",Variant,Draft,"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).","","::NATURE:ChildOf:CWE ID:788:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:788:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:787:VIEW ID:1000::NATURE:ChildOf:CWE ID:787:VIEW ID:699::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","::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 they place 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.::","::TERM:Stack Overflow:DESCRIPTION: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.::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory):NOTE:Availability DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Bypass Protection Mechanism:NOTE:Integrity Confidentiality Availability Access Control Execute Unauthorized Code or Commands Bypass Protection Mechanism Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Bypass Protection Mechanism Other:NOTE:Integrity Confidentiality Availability Access Control Other Execute Unauthorized Code or Commands Bypass Protection Mechanism Other When the consequence is arbitrary code execution, this can often be used to subvert any other security service.::","","::PHASE:Build and Compilation:STRATEGY:Compilation or Build Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows. 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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use an abstraction library to abstract away risky APIs. Not a complete solution.::PHASE:Build and Compilation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Implement and perform bounds checking on input.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Do not use dangerous functions such as gets. Use safer, equivalent functions which check for boundary errors.::PHASE:Operation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use OS-level preventative functionality, such as ASLR. This is not a complete solution.::","","","","TAXONOMY NAME:CLASP:ENTRY NAME:Stack overflow::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR38-C:ENTRY NAME:Guarantee that library functions do not form invalid pointers:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:CWE More Specific::","","TYPE:Other:NOTE: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.::", 122,"Heap-based Buffer Overflow",Variant,Draft,"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().","","::NATURE:ChildOf:CWE ID:788:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:788:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:787:VIEW ID:1000::NATURE:ChildOf:CWE ID:787:VIEW ID:699::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory):NOTE:Availability DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Bypass Protection Mechanism Modify Memory:NOTE:Integrity Confidentiality Availability Access Control Execute Unauthorized Code or Commands Bypass Protection Mechanism Modify Memory Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy. 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.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Bypass Protection Mechanism Other:NOTE:Integrity Confidentiality Availability Access Control Other Execute Unauthorized Code or Commands Bypass Protection Mechanism Other When the consequence is arbitrary code execution, this can often be used to subvert any other security service.::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION:Pre-design: Use a language or compiler that performs automatic bounds checking.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use an abstraction library to abstract away risky APIs. Not a complete solution.::PHASE:Build and Compilation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Implement and perform bounds checking on input.::PHASE:Implementation:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Do not use dangerous functions such as gets. Look for their safe equivalent, which checks for the boundary.::PHASE:Operation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use OS-level preventative functionality. This is not a complete solution, but it provides some defense in depth.::","::REFERENCE:CVE-2007-4268:DESCRIPTION:Chain: integer signedness error (CWE-195) passes signed comparison, leading to heap overflow (CWE-122):LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4268REFERENCE:CVE-2009-2523:DESCRIPTION:Chain: product does not handle when an input string is not NULL terminated (CWE-170), leading to buffer over-read (CWE-125) or heap-based buffer overflow (CWE-122).:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2523","","Memory::","TAXONOMY NAME:CLASP:ENTRY NAME:Heap overflow::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:CWE More Specific::","::92::","TYPE:Relationship:NOTE:Heap-based buffer overflows are usually just as dangerous as stack-based buffer overflows.::", 123,"Write-what-where Condition",Base,Draft,"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.","","::NATURE:ChildOf:CWE ID:119:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1003:ORDINAL:Primary::NATURE:PeerOf:CWE ID:134:VIEW ID:1000::","::ORDINALITY:Resultant:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:TECHNICAL IMPACT:Modify Memory Execute Unauthorized Code or Commands Gain Privileges or Assume Identity DoS: Crash, Exit, or Restart Bypass Protection Mechanism:NOTE:Integrity Confidentiality Availability Access Control Modify Memory Execute Unauthorized Code or Commands Gain Privileges or Assume Identity DoS: Crash, Exit, or Restart Bypass Protection Mechanism 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. If the attacker can overwrite a pointer's worth of memory (usually 32 or 64 bits), they can redirect a function pointer to their 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.::SCOPE:Integrity:SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart Modify Memory:NOTE:Integrity Availability DoS: Crash, Exit, or Restart Modify Memory Many memory accesses can lead to program termination, such as when writing to addresses that are invalid for the current process.::SCOPE:Access Control:SCOPE:Other:TECHNICAL IMPACT:Bypass Protection Mechanism Other:NOTE:Access Control Other Bypass Protection Mechanism Other When the consequence is arbitrary code execution, this can often be used to subvert any other security service.::","","::PHASE:Architecture and Design:STRATEGY:Language Selection:EFFECTIVENESS::DESCRIPTION:Use a language that provides appropriate memory abstractions.::PHASE:Operation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use OS-level preventative functionality integrated after the fact. Not a complete solution.::","","","","TAXONOMY NAME:CLASP:ENTRY NAME:Write-what-where condition::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR30-C:ENTRY NAME:Do not form or use out-of-bounds pointers or array subscripts:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR38-C:ENTRY NAME:Guarantee that library functions do not form invalid pointers:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR32-C:ENTRY NAME:Do not pass a non-null-terminated character sequence to a library function that expects a string:MAPPING FIT:Imprecise::","","", 124,"Buffer Underwrite ('Buffer Underflow')",Base,Incomplete,"The software writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.","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.","::NATURE:ChildOf:CWE ID:786:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:786:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:787:VIEW ID:1000::NATURE:ChildOf:CWE ID:787:VIEW ID:699::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","::TERM:buffer underrun:DESCRIPTION: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).::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Availability:TECHNICAL IMPACT:Modify Memory DoS: Crash, Exit, or Restart:NOTE:Integrity Availability Modify Memory DoS: Crash, Exit, or Restart Out of bounds memory access will very likely result in the corruption of relevant memory, and perhaps instructions, possibly leading to a crash.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Modify Memory Bypass Protection Mechanism Other:NOTE:Integrity Confidentiality Availability Access Control Other Execute Unauthorized Code or Commands Modify Memory Bypass Protection Mechanism Other 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.::SCOPE:Access Control:SCOPE:Other:TECHNICAL IMPACT:Bypass Protection Mechanism Other:NOTE:Access Control Other Bypass Protection Mechanism Other When the consequence is arbitrary code execution, this can often be used to subvert any other security service.::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION:Requirements specification: The choice could be made to use a language that is not susceptible to these issues.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Sanity checks should be performed on all calculated values used as index or for pointer arithmetic.::","::REFERENCE:CVE-2002-2227:DESCRIPTION:Unchecked length of SSLv2 challenge value leads to buffer underflow.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-2227REFERENCE:CVE-2007-4580:DESCRIPTION:Buffer underflow from a small size value with a large buffer (length parameter inconsistency, CWE-130):LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4580REFERENCE:CVE-2007-1584: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.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1584REFERENCE:CVE-2007-0886:DESCRIPTION:Buffer underflow resultant from encoded data that triggers an integer overflow.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0886REFERENCE:CVE-2006-6171:DESCRIPTION:Product sets an incorrect buffer size limit, leading to off-by-two buffer underflow.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6171REFERENCE:CVE-2006-4024:DESCRIPTION:Negative value is used in a memcpy() operation, leading to buffer underflow.:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4024REFERENCE:CVE-2004-2620:DESCRIPTION:Buffer underflow due to mishandled special characters:LINK:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2620","","","TAXONOMY NAME:PLOVER:ENTRY NAME:UNDER - Boundary beginning violation ('buffer underflow'?)::::TAXONOMY NAME:CLASP:ENTRY NAME:Buffer underwrite::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","","TYPE:Relationship:NOTE: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).::::TYPE:Research Gap:NOTE: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.::", 125,"Out-of-bounds Read",Base,Draft,"The software reads data past the end, or before the beginning, of the intended buffer.","Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causinfg excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.","::NATURE:ChildOf:CWE ID:119:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1003:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory::","","","::REFERENCE:CVE-2009-2523:DESCRIPTION:Chain: product does not handle when an input string is not NULL terminated (CWE-170), leading to buffer over-read (CWE-125) or heap-based buffer overflow (CWE-122).:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2523REFERENCE:CVE-2004-0112:DESCRIPTION:out-of-bounds read due to improper length check:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0112REFERENCE:CVE-2004-0183:DESCRIPTION:packet with large number of specified elements cause out-of-bounds read.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0183REFERENCE:CVE-2004-0221:DESCRIPTION:packet with large number of specified elements cause out-of-bounds read.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0221REFERENCE:CVE-2004-0184:DESCRIPTION:out-of-bounds read, resultant from integer underflow:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0184REFERENCE:CVE-2004-1940:DESCRIPTION:large length value causes out-of-bounds read:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1940REFERENCE:CVE-2004-0421:DESCRIPTION:malformed image causes out-of-bounds read:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0421","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Out-of-bounds Read::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR30-C:ENTRY NAME:Do not form or use out-of-bounds pointers or array subscripts:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR38-C:ENTRY NAME:Guarantee that library functions do not form invalid pointers:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:EXP39-C:ENTRY NAME:Do not access a variable through a pointer of an incompatible type:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR31-C:ENTRY NAME:Guarantee that storage for strings has sufficient space for character data and the null terminator:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR32-C:ENTRY NAME:Do not pass a non-null-terminated character sequence to a library function that expects a string:MAPPING FIT:CWE More Abstract::","::540::","TYPE:Research Gap:NOTE:Under-studied and under-reported. Most issues are probably labeled as buffer overflows.::", 126,"Buffer Over-read",Variant,Draft,"The software reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer.","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.","::NATURE:ChildOf:CWE ID:125:VIEW ID:1000::NATURE:ChildOf:CWE ID:125:VIEW ID:699::NATURE:ChildOf:CWE ID:788:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:788:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory::","","","::REFERENCE:CVE-2014-0160:DESCRIPTION:Chain: Heartbleed bug receives an inconsistent length parameter (CWE-130) enabling an out-of-bounds read (CWE-126), returning memory that could include private cryptographic keys and other sensitive data.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160REFERENCE:CVE-2009-2523:DESCRIPTION:Chain: product does not handle when an input string is not NULL terminated, leading to buffer over-read or heap-based buffer overflow.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2523","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Buffer over-read::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","","TYPE:Relationship:NOTE:These problems may be resultant from missing sentinel values (CWE-463) or trusting a user-influenced input length variable.::", 127,"Buffer Under-read",Variant,Draft,"The software reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations prior to the targeted buffer.","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.","::NATURE:ChildOf:CWE ID:125:VIEW ID:1000::NATURE:ChildOf:CWE ID:125:VIEW ID:699::NATURE:ChildOf:CWE ID:786:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:786:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory::","","","","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Buffer under-read::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","","TYPE:Research Gap:NOTE:Under-studied.::", 128,"Wrap-around Error",Base,Incomplete,"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.","","::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:699:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::NATURE:PeerOf:CWE ID:190:VIEW ID:1000::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Often::","::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.::","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) DoS: Instability:NOTE:Availability DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) DoS: Instability 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.::SCOPE:Integrity:TECHNICAL IMPACT:Modify Memory:NOTE:Integrity Modify Memory 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.::SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Bypass Protection Mechanism:NOTE:Confidentiality Availability Access Control Execute Unauthorized Code or Commands Bypass Protection Mechanism 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.::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION:Requirements specification: The choice could be made to use a language that is not susceptible to these issues.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Provide clear upper and lower bounds on the scale of any protocols designed.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Place sanity checks on all incremented variables to ensure that they remain within reasonable bounds.::","","","","TAXONOMY NAME:CLASP:ENTRY NAME:Wrap-around error::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:MEM07-C:ENTRY NAME:Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP1:ENTRY NAME:Glitch in computation::","::92::","TYPE:Relationship:NOTE:The relationship between overflow and wrap-around needs to be examined more closely, since several entries (including CWE-190) are closely related.::", 129,"Improper Validation of Array Index",Base,Draft,"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.","","::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::NATURE:CanPrecede:CWE ID:823:VIEW ID:1000::NATURE:CanPrecede:CWE ID:789:VIEW ID:1000::","::ORDINALITY:Resultant:DESCRIPTION: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.::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Often:::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","::TERM:out-of-bounds array index:DESCRIPTION:::TERM:index-out-of-range:DESCRIPTION:::TERM:array index underflow:DESCRIPTION:::",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Availability:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart:NOTE:Integrity Availability DoS: Crash, Exit, or Restart 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.::SCOPE:Integrity:TECHNICAL IMPACT:Modify Memory:NOTE:Integrity Modify Memory If the memory corrupted is data, rather than instructions, the system will continue to function with improper values.::SCOPE:Confidentiality:SCOPE:Integrity:TECHNICAL IMPACT:Modify Memory Read Memory:NOTE:Confidentiality Integrity Modify Memory Read Memory 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.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Execute Unauthorized Code or Commands 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.::SCOPE:Integrity:SCOPE:Availability:SCOPE:Confidentiality:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart Execute Unauthorized Code or Commands Read Memory Modify Memory:NOTE:Integrity Availability Confidentiality DoS: Crash, Exit, or Restart Execute Unauthorized Code or Commands Read Memory Modify Memory 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.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:High:DESCRIPTION: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. 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.::METHOD:Automated Dynamic Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Black Box:EFFECTIVENESS::DESCRIPTION: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.::","::PHASE:Architecture and Design:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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. 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.::PHASE:Requirements:STRATEGY:Language Selection:EFFECTIVENESS::DESCRIPTION:Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. 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.::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64].::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (NX) or its equivalent [REF-60] [REF-61].::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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. 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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening:EFFECTIVENESS::DESCRIPTION:Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. 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.::PHASE:Architecture and Design Operation:STRATEGY:Sandbox or Jail:EFFECTIVENESS:Limited:DESCRIPTION: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. 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. 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. Be careful to avoid CWE-243 and other weaknesses related to jails.::","::REFERENCE:CVE-2005-0369:DESCRIPTION:large ID in packet used as array index:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0369REFERENCE:CVE-2001-1009:DESCRIPTION:negative array index as argument to POP LIST command:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1009REFERENCE:CVE-2003-0721:DESCRIPTION:Integer signedness error leads to negative array index:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0721REFERENCE:CVE-2004-1189:DESCRIPTION:product does not properly track a count and a maximum number, which can lead to resultant array index overflow.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1189REFERENCE:CVE-2007-5756:DESCRIPTION:Chain: device driver for packet-capturing software allows access to an unintended IOCTL with resultant array index error.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5756REFERENCE:CVE-2005-2456:DESCRIPTION:Chain: array index error (CWE-129) leads to deadlock (CWE-833):LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2456","","Memory::","TAXONOMY NAME:CLASP:ENTRY NAME:Unchecked array indexing::::TAXONOMY NAME:PLOVER:ENTRY NAME:INDEX - Array index overflow::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR00-C:ENTRY NAME:Understand how arrays work::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR30-C:ENTRY NAME:Do not form or use out-of-bounds pointers or array subscripts:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ARR38-C:ENTRY NAME:Do not add or subtract an integer to a pointer if the resulting value does not refer to a valid array element::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT32-C:ENTRY NAME:Ensure that operations on signed integers do not result in overflow::::TAXONOMY NAME:CERT Perl Secure Coding:ENTRY ID:IDS32-PL:ENTRY NAME:Validate any integer that is used as an array index:MAPPING FIT:Imprecise::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::","::100::","TYPE:Relationship:NOTE: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.::::TYPE:Theoretical:NOTE:An improperly validated array index might lead directly to the always-incorrect behavior of access of array using out-of-bounds index.::", 13,"ASP.NET Misconfiguration: Password in Configuration File",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:260:VIEW ID:1000:ORDINAL:Primary::","","","","",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Access Control:TECHNICAL IMPACT:Gain Privileges or Assume Identity::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Credentials stored in configuration files should be encrypted, Use standard APIs and industry accepted algorithms to encrypt the credentials stored in configuration files.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:ASP.NET Misconfiguration: Password in Configuration File::","","", 130,"Improper Handling of Length Parameter Inconsistency ",Base,Incomplete,"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.","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.","::NATURE:ChildOf:CWE ID:240:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:699:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:805:VIEW ID:1000::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Sometimes::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Sometimes:::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","::TERM:length manipulation:DESCRIPTION:::TERM:length tampering:DESCRIPTION:::",":::PHASE:Architecture and Design:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Varies by Context::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Do not let the user control the size of the buffer.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Validate that the length of the user-supplied data is consistent with the buffer size.::","::REFERENCE:CVE-2014-0160:DESCRIPTION:Chain: Heartbleed bug receives an inconsistent length parameter (CWE-130) enabling an out-of-bounds read (CWE-126), returning memory that could include private cryptographic keys and other sensitive data.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160REFERENCE:CVE-2009-2299:DESCRIPTION:Web application firewall consumes excessive memory when an HTTP request contains a large Content-Length value but no POST data.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2299REFERENCE:CVE-2001-0825: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0825REFERENCE:CVE-2001-1186: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1186REFERENCE:CVE-2001-0191: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0191REFERENCE:CVE-2003-0429: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0429REFERENCE:CVE-2000-0655: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0655REFERENCE:CVE-2004-0492: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0492REFERENCE:CVE-2004-0201: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:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0201REFERENCE:CVE-2003-0825: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:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0825REFERENCE:CVE-2004-0095: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0095REFERENCE:CVE-2004-0826: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0826REFERENCE:CVE-2004-0808: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0808REFERENCE:CVE-2002-1357: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1357REFERENCE:CVE-2004-0774: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0774REFERENCE:CVE-2004-0989:DESCRIPTION:Multiple buffer overflows in xml library that may allow remote attackers to execute arbitrary code via long URLs.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0989REFERENCE:CVE-2004-0568: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0568REFERENCE:CVE-2003-0327: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0327REFERENCE:CVE-2003-0345: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0345REFERENCE:CVE-2004-0430: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0430REFERENCE:CVE-2005-0064:DESCRIPTION:PDF viewer allows remote attackers to execute arbitrary code via a PDF file with a large /Encrypt /Length keyLength value.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0064REFERENCE:CVE-2004-0413: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0413REFERENCE:CVE-2004-0940:DESCRIPTION:Is effectively an accidental double increment of a counter that prevents a length check conditional from exiting a loop.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0940REFERENCE:CVE-2002-1235:DESCRIPTION:Length field of a request not verified.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1235REFERENCE:CVE-2005-3184:DESCRIPTION:Buffer overflow by modifying a length value.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-3184REFERENCE:SECUNIA:18747:DESCRIPTION:Length field inconsistency crashes cell phone.:LINK:http://secunia.com/advisories/18747/","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Length Parameter Inconsistency::","::47::","TYPE:Relationship:NOTE:This probably overlaps other categories including zero-length issues.::", 131,"Incorrect Calculation of Buffer Size",Base,Draft,"The software does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.","","::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:699:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::NATURE:CanPrecede:CWE ID:119:VIEW ID:699::","","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Availability:SCOPE:Confidentiality:TECHNICAL IMPACT:DoS: Crash, Exit, or Restart Execute Unauthorized Code or Commands Read Memory Modify Memory:NOTE:Integrity Availability Confidentiality DoS: Crash, Exit, or Restart Execute Unauthorized Code or Commands Read Memory Modify Memory 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.::","::METHOD:Automated Static Analysis:EFFECTIVENESS:High:DESCRIPTION: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. 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.::METHOD:Automated Dynamic Analysis:EFFECTIVENESS:Moderate:DESCRIPTION: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.::METHOD:Manual Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Manual Analysis:EFFECTIVENESS:High:DESCRIPTION: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. 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.::METHOD:Automated Static Analysis - Binary or Bytecode:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis::METHOD:Manual Static Analysis - Binary or Bytecode:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies::METHOD:Manual Static Analysis - Source Code:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections)::METHOD:Automated Static Analysis - Source Code:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer Cost effective for partial coverage: Source Code Quality Analyzer::METHOD:Architecture or Design Review:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Formal Methods / Correct-By-Construction Cost effective for partial coverage: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)::","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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 & characters to & for HTML entity encoding, the output buffer needs to be at least 5 times as large as the input buffer.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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. [REF-7] Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS:Moderate:DESCRIPTION:Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Use sizeof() on the appropriate data type to avoid CWE-467.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Use libraries or frameworks that make it easier to handle numbers without unexpected consequences, or buffer allocation routines that automatically track buffer size. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]::PHASE:Build and Compilation:STRATEGY:Compilation or Build Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows. 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.::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64].::PHASE:Operation:STRATEGY:Environment Hardening:EFFECTIVENESS:Defense in Depth:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (NX) or its equivalent [REF-61] [REF-60].::PHASE:Implementation:STRATEGY:Compilation or Build Hardening:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening:EFFECTIVENESS::DESCRIPTION:Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. 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.::PHASE:Architecture and Design Operation:STRATEGY:Sandbox or Jail:EFFECTIVENESS:Limited:DESCRIPTION: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. 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. 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. Be careful to avoid CWE-243 and other weaknesses related to jails.::","::REFERENCE:CVE-2004-1363:DESCRIPTION:substitution overflow: buffer overflow using environment variables that are expanded after the length check is performed:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1363REFERENCE:CVE-2004-0747:DESCRIPTION:substitution overflow: buffer overflow using expansion of environment variables:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0747REFERENCE:CVE-2005-2103:DESCRIPTION:substitution overflow: buffer overflow using a large number of substitution strings:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2103REFERENCE:CVE-2005-3120:DESCRIPTION:transformation overflow: product adds extra escape characters to incoming data, but does not account for them in the buffer length:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-3120REFERENCE:CVE-2003-0899:DESCRIPTION:transformation overflow: buffer overflow when expanding > to >, etc.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0899REFERENCE:CVE-2001-0334:DESCRIPTION:expansion overflow: buffer overflow using wildcards:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0334REFERENCE:CVE-2001-0248:DESCRIPTION:expansion overflow: long pathname + glob = overflow:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0248REFERENCE:CVE-2001-0249:DESCRIPTION:expansion overflow: long pathname + glob = overflow:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0249REFERENCE:CVE-2002-0184:DESCRIPTION:special characters in argument are not properly expanded:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0184REFERENCE:CVE-2004-0434:DESCRIPTION:small length value leads to heap overflow:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0434REFERENCE:CVE-2002-1347:DESCRIPTION:multiple variants:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1347REFERENCE:CVE-2005-0490:DESCRIPTION:needs closer investigation, but probably expansion-based:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0490REFERENCE:CVE-2004-0940:DESCRIPTION:needs closer investigation, but probably expansion-based:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0940REFERENCE:CVE-2008-0599:DESCRIPTION:Chain: Language interpreter calculates wrong buffer size (CWE-131) by using size = ptr ? X : Y instead of size = (ptr ? X : Y) expression.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0599","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Other length calculation error::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT30-C:ENTRY NAME:Ensure that unsigned integer operations do not wrap:MAPPING FIT:Imprecise::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:MEM35-C:ENTRY NAME:Allocate sufficient memory for an object:MAPPING FIT:CWE More Abstract::","::100::47::","TYPE:Maintenance:NOTE:This is a broad category. Some examples include: simple math errors, incorrectly updating parallel counters, 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). This level of detail is rarely available in public reports, so it is difficult to find good examples.::::TYPE:Maintenance:NOTE:This weakness may be a composite or a chain. It also may contain layering or perspective differences. 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.::", 134,"Use of Externally-Controlled Format String",Base,Draft,"The software uses a function that accepts a format string as an argument, but the format string originates from an external source.","When an attacker can modify an externally-controlled format string, this can lead to buffer overflows, denial of service, or data representation problems. It should be noted that in some circumstances, such as internationalization, the set of format strings is externally controlled by design. If the source of these format strings is trusted (e.g. only contained in library files that are only modifiable by the system administrator), then the external control might not itself pose a vulnerability.","::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::NATURE:PeerOf:CWE ID:123:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:Perl:LANGUAGE PREVALENCE:Rarely::","","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory:NOTE:Confidentiality Read Memory Format string problems allow for information disclosure which can severely simplify exploitation of the program.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Execute Unauthorized Code or Commands Format string problems can result in the execution of arbitrary code.::","::METHOD:Automated Static Analysis:EFFECTIVENESS::DESCRIPTION: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.::METHOD:Black Box:EFFECTIVENESS:Limited:DESCRIPTION: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.::METHOD:Automated Static Analysis - Binary or Bytecode:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis Cost effective for partial coverage: Binary / Bytecode simple extractor – strings, ELF readers, etc.::METHOD:Manual Static Analysis - Binary or Bytecode:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies::METHOD:Dynamic Analysis with Automated Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners::METHOD:Dynamic Analysis with Manual Results Interpretation:EFFECTIVENESS:SOAR Partial:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer::METHOD:Manual Static Analysis - Source Code:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Manual Source Code Review (not inspections) Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source::METHOD:Automated Static Analysis - Source Code:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer Cost effective for partial coverage: Warning Flags::METHOD:Architecture or Design Review:EFFECTIVENESS:High:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Formal Methods / Correct-By-Construction Cost effective for partial coverage: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)::","::PHASE:Requirements:STRATEGY::EFFECTIVENESS::DESCRIPTION:Choose a language that is not subject to this flaw.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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. [REF-116] [REF-117]::PHASE:Build and Compilation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Heed the warnings of compilers and linkers, since they may alert you to improper usage.::","::REFERENCE:CVE-2002-1825:DESCRIPTION:format string in Perl program:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1825REFERENCE:CVE-2001-0717:DESCRIPTION:format string in bad call to syslog function:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0717REFERENCE:CVE-2002-0573:DESCRIPTION:format string in bad call to syslog function:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0573REFERENCE:CVE-2002-1788:DESCRIPTION:format strings in NNTP server responses:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1788REFERENCE:CVE-2006-2480:DESCRIPTION:Format string vulnerability exploited by triggering errors or warnings, as demonstrated via format string specifiers in a .bmp filename.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2480REFERENCE:CVE-2007-2027:DESCRIPTION:Chain: untrusted search path enabling resultant format string by loading malicious internationalization messages:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2027","::LoggingError HandlingString Processing","Memory::","TAXONOMY NAME:PLOVER:ENTRY NAME:Format string vulnerability::::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Format String::::TAXONOMY NAME:CLASP:ENTRY NAME:Format string problem::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO30-C:ENTRY NAME:Exclude user input from format strings:MAPPING FIT:Exact::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO47-C:ENTRY NAME:Use valid format strings:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A1:ENTRY NAME:Unvalidated Input:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:WASC:ENTRY ID:6:ENTRY NAME:Format String::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:IDS06-J:ENTRY NAME:Exclude user input from format strings::::TAXONOMY NAME:CERT Perl Secure Coding:ENTRY ID:IDS30-PL:ENTRY NAME:Exclude user input from format strings:MAPPING FIT:Exact::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::135::67::","TYPE:Applicable Platform:NOTE:This weakness is possible in any programming language that support format strings.::::TYPE:Other:NOTE: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. Frequently targeted entities are file names, process names, identifiers. 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, they 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.::::TYPE:Research Gap:NOTE: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.::", 135,"Incorrect Calculation of Multi-Byte String Length",Base,Draft,"The software does not correctly calculate the length of strings that can contain wide or multi-byte characters.","","::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::","","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:TECHNICAL IMPACT:Execute Unauthorized Code or Commands:NOTE:Integrity Confidentiality Availability Execute Unauthorized Code or Commands 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.::SCOPE:Availability:SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory):NOTE:Availability Confidentiality Read Memory DoS: Crash, Exit, or Restart DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) 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.::SCOPE:Confidentiality:TECHNICAL IMPACT:Read Memory:NOTE:Confidentiality Read Memory 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.::","","::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION:Always verify the length of the string unit character.::PHASE:Implementation:STRATEGY:Libraries or Frameworks:EFFECTIVENESS::DESCRIPTION:Use length computing functions (e.g. strlen, wcslen, etc.) appropriately with their equivalent type (e.g.: byte, wchar_t, etc.)::","","","","TAXONOMY NAME:CLASP:ENTRY NAME:Improper string length checking::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:FIO10-J:ENTRY NAME:Ensure the array is filled when using read() to fill an array::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP10:ENTRY NAME:Incorrect Buffer Length Computation::","","", 138,"Improper Neutralization of Special Elements",Class,Draft,"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.","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 < (less than) as meaning read input from a file.","::NATURE:ChildOf:CWE ID:707:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:699:ORDINAL:Primary::","::ORDINALITY:Primary:DESCRIPTION:::",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Alter Execution Logic DoS: Crash, Exit, or Restart::","","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelist (e.g. a regular expression) that defines valid input according to the requirements specifications. Strictly filter any input that does not match against the whitelist. Properly encode your output, and quote any elements that have special meaning to the component with which you are communicating.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::","::REFERENCE:CVE-2001-0677:DESCRIPTION:Read arbitrary files from mail client by providing a special MIME header that is internally used to store pathnames for attachments.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0677REFERENCE:CVE-2000-0703:DESCRIPTION:Setuid program does not cleanse special escape sequence before sending data to a mail program, causing the mail program to process those sequences.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0703REFERENCE:CVE-2003-0020:DESCRIPTION:Multi-channel issue. Terminal escape sequences not filtered from log files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0020REFERENCE:CVE-2003-0083:DESCRIPTION:Multi-channel issue. Terminal escape sequences not filtered from log files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0083","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Special Elements (Characters or Reserved Words)::::TAXONOMY NAME:PLOVER:ENTRY NAME:Custom Special Character Injection::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::15::","TYPE:Relationship:NOTE: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.::::TYPE:Relationship:NOTE: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.::::TYPE:Research Gap:NOTE: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.::", 14,"Compiler Removal of Code to Clear Buffers",Variant,Draft,"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.","This compiler optimization error occurs when: 1. Secret data are stored in memory. 2. The secret data are scrubbed from memory by overwriting its contents. 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.","::NATURE:ChildOf:CWE ID:733:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:733:VIEW ID:1000:ORDINAL:Primary::","","::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Build and Compilation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:SCOPE:Access Control:TECHNICAL IMPACT:Read Memory Bypass Protection Mechanism:NOTE:Confidentiality Access Control Read Memory Bypass Protection Mechanism 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.::","::METHOD:Black Box:EFFECTIVENESS::DESCRIPTION: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.::METHOD:White Box:EFFECTIVENESS::DESCRIPTION: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.::","::PHASE:Implementation:STRATEGY::EFFECTIVENESS::DESCRIPTION:Store the sensitive data in a volatile memory location if available.::PHASE:Build and Compilation:STRATEGY::EFFECTIVENESS::DESCRIPTION:If possible, configure your compiler so that it does not remove dead stores.::PHASE:Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION:Where possible, encrypt sensitive data that are used by a software system.::","","","Memory::","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Insecure Compiler Optimization::::TAXONOMY NAME:PLOVER:ENTRY NAME:Sensitive memory uncleared by compiler optimization::::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A8:ENTRY NAME:Insecure Storage:MAPPING FIT:CWE More Specific::::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:MSC06-C:ENTRY NAME:Be aware of compiler optimization when dealing with sensitive data::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::","","", 140,"Improper Neutralization of Delimiters",Base,Draft,"The software does not neutralize or incorrectly neutralizes delimiters.","","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","","","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Delimiter Problems::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::15::","", 141,"Improper Neutralization of Parameter/Argument Delimiters",Variant,Draft,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2003-0307:DESCRIPTION:Attacker inserts field separator into input to specify admin privileges.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0307","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Parameter Delimiter::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 142,"Improper Neutralization of Value Delimiters",Variant,Draft,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2000-0293:DESCRIPTION:Multiple internal space, insufficient quoting - program does not use proper delimiter between values.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0293","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Value Delimiter::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 143,"Improper Neutralization of Record Delimiters",Variant,Draft,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2004-1982:DESCRIPTION:Carriage returns in subject field allow adding new records to data file.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1982REFERENCE:CVE-2001-0527:DESCRIPTION:Attacker inserts carriage returns and | field separator characters to add new user/privileges.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0527","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Record Delimiter::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 144,"Improper Neutralization of Line Delimiters",Variant,Draft,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:93:VIEW ID:1000::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2002-0267:DESCRIPTION:Linebreak in field of PHP script allows admin privileges when written to data file.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0267","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Line Delimiter::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:IDS03-J:ENTRY NAME:Do not log unsanitized user input::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","TYPE:Relationship:NOTE:Depending on the language and syntax being used, this could be the same as the record delimiter (CWE-143).::", 145,"Improper Neutralization of Section Delimiters",Variant,Incomplete,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions. 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.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:93:VIEW ID:1000::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Section Delimiter::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","TYPE:Relationship:NOTE:Depending on the language and syntax being used, this could be the same as the record delimiter (CWE-143).::", 146,"Improper Neutralization of Expression/Command Delimiters",Variant,Incomplete,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:140:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:140:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:TECHNICAL IMPACT:Execute Unauthorized Code or Commands Alter Execution Logic::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION:Developers should anticipate that inter-expression and inter-command delimiters will be injected/removed/manipulated in the input vectors of their software system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Delimiter between Expressions or Commands::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::15::6::","TYPE:Relationship:NOTE:A shell metacharacter (covered in CWE-150) is one example of a potential delimiter that may need to be neutralized.::", 147,"Improper Neutralization of Input Terminators",Variant,Draft,"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.","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.","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2000-0319: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0319REFERENCE:CVE-2000-0320: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0320REFERENCE:CVE-2001-0996:DESCRIPTION:Mail server does not quote end-of-input terminator if it appears in the middle of a message.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0996REFERENCE:CVE-2002-0001:DESCRIPTION:Improperly terminated comment or phrase allows commands.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0001","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Input Terminator::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::460::","", 148,"Improper Neutralization of Input Leaders",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","","","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Input Leader::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","","", 149,"Improper Neutralization of Quoting Syntax",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","","","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2004-0956: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.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0956REFERENCE:CVE-2003-1016:DESCRIPTION:MIE. MFV too? bypass AV/security with fields that should not be quoted, duplicate quotes, missing leading/trailing quotes.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1016","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Quoting Element::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::","::468::","", 15,"External Control of System or Configuration Setting",Base,Incomplete,"One or more system settings or configuration elements can be externally controlled by a user.","Allowing external control of system settings can disrupt service or cause an application to behave in unexpected, and potentially malicious ways.","::NATURE:ChildOf:CWE ID:642:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:642:VIEW ID:699:ORDINAL:Primary::NATURE:ChildOf:CWE ID:610:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::","","","","",":::PHASE:Implementation:DESCRIPTION::::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Other:TECHNICAL IMPACT:Varies by Context::","","::PHASE:Architecture and Design:STRATEGY:Separation of Privilege:EFFECTIVENESS::DESCRIPTION: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. 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.::PHASE:Implementation Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::PHASE:Implementation Architecture and Design:STRATEGY::EFFECTIVENESS::DESCRIPTION: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.::","","","","TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Setting Manipulation::::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP25:ENTRY NAME:Tainted input to variable::","::13::146::69::76::77::","", 150,"Improper Neutralization of Escape, Meta, or Control Sequences",Variant,Incomplete,"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.","As data is parsed, an injected/absent/malformed delimiter may cause the process to take unexpected actions.","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2002-0542:DESCRIPTION:The mail program processes special ~ escape sequence even when not in interactive mode.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0542REFERENCE:CVE-2000-0703:DESCRIPTION:Setuid program does not filter escape sequences before calling mail program.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0703REFERENCE:CVE-2002-0986:DESCRIPTION:Mail function does not filter control characters from arguments, allowing mail message content to be modified.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0986REFERENCE:CVE-2003-0020:DESCRIPTION:Multi-channel issue. Terminal escape sequences not filtered from log files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0020REFERENCE:CVE-2003-0083:DESCRIPTION:Multi-channel issue. Terminal escape sequences not filtered from log files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0083REFERENCE:CVE-2003-0021:DESCRIPTION:Terminal escape sequences not filtered by terminals when displaying files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0021REFERENCE:CVE-2003-0022:DESCRIPTION:Terminal escape sequences not filtered by terminals when displaying files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0022REFERENCE:CVE-2003-0023:DESCRIPTION:Terminal escape sequences not filtered by terminals when displaying files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0023REFERENCE:CVE-2003-0063:DESCRIPTION:Terminal escape sequences not filtered by terminals when displaying files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0063REFERENCE:CVE-2000-0476:DESCRIPTION:Terminal escape sequences not filtered by terminals when displaying files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0476REFERENCE:CVE-2001-1556:DESCRIPTION:MFV. (multi-channel). Injection of control characters into log files that allow information hiding when using raw Unix programs to read the files.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1556","","","TAXONOMY NAME:PLOVER:ENTRY NAME:Escape, Meta, or Control Character / Sequence::::TAXONOMY NAME:CERT Java Secure Coding:ENTRY ID:IDS03-J:ENTRY NAME:Do not log unsanitized user input::","::41::81::93::","", 151,"Improper Neutralization of Comment Delimiters",Variant,Draft,"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.","","::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:138:VIEW ID:699:ORDINAL:Primary::","",":::LANGUAGE CLASS:Language-Independent:LANGUAGE PREVALENCE:Undetermined::","","",":::PHASE:Implementation:DESCRIPTION:::","",,"::SCOPE:Integrity:TECHNICAL IMPACT:Unexpected State::","","::PHASE::STRATEGY::EFFECTIVENESS::DESCRIPTION: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 whitelists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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. 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. 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.::PHASE:Implementation:STRATEGY:Output Encoding:EFFECTIVENESS::DESCRIPTION: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).::PHASE:Implementation:STRATEGY:Input Validation:EFFECTIVENESS::DESCRIPTION: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.::","::REFERENCE:CVE-2002-0001:DESCRIPTION:Mail client command execution due to improperly terminated comment in address list.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0001REFERENCE:CVE-2004-0162:DESCRIPTION:MIE. RFC822 comment fields may be processed as other fields by clients.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0162REFERENCE:CVE-2004-1686:DESCRIPTION:Well-placed comment bypasses security warning.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1686REFERENCE:CVE-2005-1909: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 >!-- while denying most other tags.:LINK:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1909REFERENCE:CVE-2005-1969: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