CWE-ID
stringlengths 8
118
| Name
stringclasses 3
values | Weakness Abstraction
stringclasses 3
values | Status
stringlengths 36
505
| Description
stringlengths 45
4.19k
⌀ | Extended Description
stringlengths 57
363
| Related Weaknesses
stringclasses 15
values | Weakness Ordinalities
stringclasses 74
values | Applicable Platforms
stringclasses 15
values | Background Details
stringclasses 49
values | Alternate Terms
stringclasses 61
values | Modes Of Introduction
float64 | Exploitation Factors
float64 | Likelihood of Exploit
stringlengths 28
1.92k
⌀ | Common Consequences
stringclasses 52
values | Detection Methods
stringlengths 75
10.9k
⌀ | Potential Mitigations
stringlengths 117
8.88k
⌀ | Observed Examples
stringclasses 9
values | Functional Areas
stringclasses 4
values | Affected Resources
stringlengths 48
1.78k
⌀ | Taxonomy Mappings
stringlengths 5
102
⌀ | Related Attack Patterns
stringlengths 50
2.48k
⌀ | Notes
float64 | __index_level_0__
int64 15
1.39k
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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:610:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::
| null |
::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:Setting manipulation vulnerabilities occur when an attacker can control values that govern the behavior of the system, manage specific resources, or in some way affect the functionality of the application.::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Other:IMPACT:Varies by Context::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::PHASE:Implementation Architecture and Design: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: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.::
| null | null | null |
::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::176::203::270::271::579::69::76::77::
| null | null | 15
|
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
|
Base
|
Stable
|
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
|
Many file operations are intended to take place within a restricted directory. By using special elements such as .. and / separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the ../ sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as /usr/local/bin, which may also be useful in accessing unexpected files. This is referred to as absolute path traversal. In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the product may add .txt to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
|
::NATURE:ChildOf:CWE ID:706:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:706:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:668:VIEW ID:1000::
|
::ORDINALITY:Primary::ORDINALITY:Resultant::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Directory traversal::TERM:Path traversal:DESCRIPTION:Path traversal is preferred over directory traversal, but both terms are attack-focused.::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.::SCOPE:Integrity:IMPACT:Modify Files or Directories:NOTE:The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.::SCOPE:Confidentiality:IMPACT:Read Files or Directories:NOTE:The attacker may be able read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of a protection mechanisms such as authentication, it has the potential to lockout every user of the product.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability.:EFFECTIVENESS:High::METHOD:Manual Static Analysis:DESCRIPTION:Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints.:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Cost effective for partial coverage: Binary Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single . character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as / to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434. Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering / is insufficient protection if the filesystem also supports the use of as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if ../ sequences are removed from the .../...// string in a sequential fashion, two instances of ../ would be removed from the original string, but the remaining characters would still form the ../ string.::PHASE:Architecture and Design: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:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked. Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes .. sequences and symbolic links (CWE-23, CWE-59). This includes: realpath() in C getCanonicalPath() in Java GetFullPath() in ASP.NET realpath() or abs_path() in Perl realpath() in PHP::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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.::PHASE:Operation:STRATEGY:Firewall:DESCRIPTION:Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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:STRATEGY:Enforcement by Conversion: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. For example, ID 1 could map to inbox.txt and ID 2 could map to profile.txt. Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.::PHASE:Architecture and Design Operation:STRATEGY:Sandbox or Jail: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.:EFFECTIVENESS:Limited::PHASE:Architecture and Design Operation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately. This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.::PHASE:Implementation:DESCRIPTION:Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not. In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.::PHASE:Operation Implementation:STRATEGY:Environment Hardening:DESCRIPTION:When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.::
|
::REFERENCE:CVE-2022-45918:DESCRIPTION:Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using ../ sequences (CWE-24):LINK:https://www.cve.org/CVERecord?id=CVE-2022-45918::REFERENCE:CVE-2019-20916:DESCRIPTION:Python package manager does not correctly restrict the filename specified in a Content-Disposition header, allowing arbitrary file read using path traversal sequences such as ../:LINK:https://www.cve.org/CVERecord?id=CVE-2019-20916::REFERENCE:CVE-2022-31503:DESCRIPTION:Python package constructs filenames using an unsafe os.path.join call on untrusted input, allowing absolute path traversal because os.path.join resets the pathname to an absolute path that is specified as part of the input.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-31503::REFERENCE:CVE-2022-24877:DESCRIPTION:directory traversal in Go-based Kubernetes operator app allows accessing data from the controller's pod file system via ../ sequences in a yaml file:LINK:https://www.cve.org/CVERecord?id=CVE-2022-24877::REFERENCE:CVE-2021-21972:DESCRIPTION:Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (CWE-306), then uses .. path traversal sequences (CWE-23) in the file to access unexpected files, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-21972::REFERENCE:CVE-2020-4053:DESCRIPTION:a Kubernetes package manager written in Go allows malicious plugins to inject path traversal sequences into a plugin archive (Zip slip) to copy a file outside the intended directory:LINK:https://www.cve.org/CVERecord?id=CVE-2020-4053::REFERENCE:CVE-2020-3452:DESCRIPTION:Chain: security product has improper input validation (CWE-20) leading to directory traversal (CWE-22), as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-3452::REFERENCE:CVE-2019-10743:DESCRIPTION:Go-based archive library allows extraction of files to locations outside of the target folder with ../ path traversal sequences in filenames in a zip file, aka Zip Slip:LINK:https://www.cve.org/CVERecord?id=CVE-2019-10743::REFERENCE:CVE-2010-0467:DESCRIPTION:Newsletter module allows reading arbitrary files using ../ sequences.:LINK:https://www.cve.org/CVERecord?id=CVE-2010-0467::REFERENCE:CVE-2006-7079:DESCRIPTION:Chain: PHP app uses extract for register_globals compatibility layer (CWE-621), enabling path traversal (CWE-22):LINK:https://www.cve.org/CVERecord?id=CVE-2006-7079::REFERENCE:CVE-2009-4194:DESCRIPTION:FTP server allows deletion of arbitrary files using .. in the DELE command.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4194::REFERENCE:CVE-2009-4053:DESCRIPTION:FTP server allows creation of arbitrary directories using .. in the MKD command.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4053::REFERENCE:CVE-2009-0244:DESCRIPTION:FTP service for a Bluetooth device allows listing of directories, and creation or reading of files using .. sequences.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-0244::REFERENCE:CVE-2009-4013:DESCRIPTION:Software package maintenance program allows overwriting arbitrary files using ../ sequences.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4013::REFERENCE:CVE-2009-4449:DESCRIPTION:Bulletin board allows attackers to determine the existence of files using the avatar.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4449::REFERENCE:CVE-2009-4581:DESCRIPTION:PHP program allows arbitrary code execution using .. in filenames that are fed to the include() function.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4581::REFERENCE:CVE-2010-0012:DESCRIPTION:Overwrite of files using a .. in a Torrent file.:LINK:https://www.cve.org/CVERecord?id=CVE-2010-0012::REFERENCE:CVE-2010-0013:DESCRIPTION:Chat program allows overwriting files using a custom smiley request.:LINK:https://www.cve.org/CVERecord?id=CVE-2010-0013::REFERENCE:CVE-2008-5748:DESCRIPTION:Chain: external control of values for user's desired language and theme enables path traversal.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5748::REFERENCE:CVE-2009-1936:DESCRIPTION:Chain: library file sends a redirect if it is directly requested but continues to execute, allowing remote file inclusion and path traversal.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-1936::
|
::File Processing::
|
::File or Directory::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Path Traversal::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A4:ENTRY NAME:Insecure Direct Object Reference:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A2:ENTRY NAME:Broken Access Control:MAPPING FIT:CWE More Specific::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO02-C:ENTRY NAME:Canonicalize path names originating from untrusted sources::TAXONOMY NAME:SEI CERT Perl Coding Standard:ENTRY ID:IDS00-PL:ENTRY NAME:Canonicalize path names before validating them:MAPPING FIT:Exact::TAXONOMY NAME:WASC:ENTRY ID:33:ENTRY NAME:Path Traversal::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP16:ENTRY NAME:Path Traversal::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-22::
|
::126::64::76::78::79::
|
::TYPE:Relationship:NOTE:Pathname equivalence can be regarded as a type of canonicalization error.::TYPE:Relationship:NOTE:Some pathname equivalence issues are not directly related to directory traversal, rather are used to bypass security-relevant checks for whether a file/directory can be accessed by the attacker (e.g. a trailing / on a filename could bypass access rules that don't expect a trailing /, causing a server to provide the file when it normally would not).::TYPE:Terminology:NOTE:Like other weaknesses, terminology is often based on the types of manipulations used, instead of the underlying weaknesses. Some people use directory traversal only to refer to the injection of .. and equivalent sequences whose specific meaning is to traverse directories. Other variants like absolute pathname and drive letter have the *effect* of directory traversal, but some people may not call it such, since it doesn't involve .. or equivalent.::TYPE:Research Gap:NOTE:Many variants of path traversal attacks are probably under-studied with respect to root cause. CWE-790 and CWE-182 begin to cover part of this gap.::TYPE:Research Gap:NOTE:Incomplete diagnosis or reporting of vulnerabilities can make it difficult to know which variant is affected. For example, a researcher might say that .. is vulnerable, but not test ../ which may also be vulnerable. Any combination of directory separators (/, , etc.) and numbers of . (e.g. ....) can produce unique variants; for example, the //../ variant is not listed (CVE-2004-0325). See this entry's children and lower-level descendants.::
| null | 22
|
Improper Resolution of Path Equivalence
|
Base
|
Incomplete
|
The product is vulnerable to file system contents disclosure through path equivalence. Path equivalence involves the use of special characters in file and directory names. The associated manipulations are intended to generate multiple names for the same object.
|
Path equivalence is usually employed in order to circumvent access controls expressed using an incomplete set of file name or file path representations. This is different from path traversal, wherein the manipulations are performed to generate a name for a different object.
|
::NATURE:ChildOf:CWE ID:706:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Access Control:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:IMPACT:Bypass Protection Mechanism:NOTE:An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism than an attacker may be able to bypass the mechanism.::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Bytecode Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists 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: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: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2000-1114:DESCRIPTION:Source code disclosure using trailing dot:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1114::REFERENCE:CVE-2002-1986:DESCRIPTION:Source code disclosure using trailing dot:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1986::REFERENCE:CVE-2004-2213:DESCRIPTION:Source code disclosure using trailing dot or trailing encoding space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2213::REFERENCE:CVE-2005-3293:DESCRIPTION:Source code disclosure using trailing dot:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3293::REFERENCE:CVE-2004-0061:DESCRIPTION:Bypass directory access restrictions using trailing dot in URL:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0061::REFERENCE:CVE-2000-1133:DESCRIPTION:Bypass directory access restrictions using trailing dot in URL:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1133::REFERENCE:CVE-2001-1386:DESCRIPTION:Bypass check for .lnk extension using .lnk.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1386::REFERENCE:CVE-2001-0693:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0693::REFERENCE:CVE-2001-0778:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0778::REFERENCE:CVE-2001-1248:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1248::REFERENCE:CVE-2004-0280:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0280::REFERENCE:CVE-2005-0622:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0622::REFERENCE:CVE-2005-1656:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1656::REFERENCE:CVE-2002-1603:DESCRIPTION:Source disclosure via trailing encoded space %20:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1603::REFERENCE:CVE-2001-0054:DESCRIPTION:Multi-Factor Vulnerability (MFV). directory traversal and other issues in FTP server using Web encodings such as %20; certain manipulations have unusual side effects.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0054::REFERENCE:CVE-2002-1451:DESCRIPTION:Trailing space (+ in query string) leads to source code disclosure.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1451::REFERENCE:CVE-2000-0293:DESCRIPTION:Filenames with spaces allow arbitrary file deletion when the product does not properly quote them; some overlap with path traversal.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0293::REFERENCE:CVE-2001-1567:DESCRIPTION:+ characters in query string converted to spaces before sensitive file/extension (internal space), leading to bypass of access restrictions to the file.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1567::REFERENCE:CVE-2002-0253:DESCRIPTION:Overlaps infoleak:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0253::REFERENCE:CVE-2001-0446:DESCRIPTION:Application server allows remote attackers to read source code for .jsp files by appending a / to the requested URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0446::REFERENCE:CVE-2004-0334:DESCRIPTION:Bypass Basic Authentication for files using trailing /:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0334::REFERENCE:CVE-2001-0893:DESCRIPTION:Read sensitive files with trailing /:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0893::REFERENCE:CVE-2001-0892:DESCRIPTION:Web server allows remote attackers to view sensitive files under the document root (such as .htpasswd) via a GET request with a trailing /.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0892::REFERENCE:CVE-2004-1814:DESCRIPTION:Directory traversal vulnerability in server allows remote attackers to read protected files via .. (dot dot) sequences in an HTTP request.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1814::REFERENCE:CVE-2002-1483:DESCRIPTION:Read files with full pathname using multiple internal slash.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1483::REFERENCE:CVE-1999-1456:DESCRIPTION:Server allows remote attackers to read arbitrary files via a GET request with more than one leading / (slash) character in the filename.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1456::REFERENCE:CVE-2004-0578:DESCRIPTION:Server allows remote attackers to read arbitrary files via leading slash (//) characters in a URL request.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0578::REFERENCE:CVE-2002-0275:DESCRIPTION:Server allows remote attackers to bypass authentication and read restricted files via an extra / (slash) in the requested URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0275::REFERENCE:CVE-2004-1032:DESCRIPTION:Product allows local users to delete arbitrary files or create arbitrary empty files via a target filename with a large number of leading slash (/) characters.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1032::REFERENCE:CVE-2002-1238:DESCRIPTION:Server allows remote attackers to bypass access restrictions for files via an HTTP request with a sequence of multiple / (slash) characters such as http://www.example.com///file/.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1238::REFERENCE:CVE-2004-1878:DESCRIPTION:Product allows remote attackers to bypass authentication, obtain sensitive information, or gain access via a direct request to admin/user.pl preceded by // (double leading slash).:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1878::REFERENCE:CVE-2005-1365:DESCRIPTION:Server allows remote attackers to execute arbitrary commands via a URL with multiple leading / (slash) characters and .. sequences.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1365::REFERENCE:CVE-2000-1050:DESCRIPTION:Access directory using multiple leading slash.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1050::REFERENCE:CVE-2001-1072:DESCRIPTION:Bypass access restrictions via multiple leading slash, which causes a regular expression to fail.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1072::REFERENCE:CVE-2004-0235:DESCRIPTION:Archive extracts to arbitrary files using multiple leading slash in filenames in the archive.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0235::REFERENCE:CVE-2002-1078:DESCRIPTION:Directory listings in web server using multiple trailing slash:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1078::REFERENCE:CVE-2004-0847:DESCRIPTION:ASP.NET allows remote attackers to bypass authentication for .aspx files in restricted directories via a request containing a (1) (backslash) or (2) %5C (encoded backslash), aka Path Validation Vulnerability.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0847::REFERENCE:CVE-2000-0004:DESCRIPTION:Server allows remote attackers to read source code for executable files by inserting a . (dot) into the URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0004::REFERENCE:CVE-2002-0304:DESCRIPTION:Server allows remote attackers to read password-protected files via a /./ in the HTTP request.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0304::REFERENCE:CVE-1999-1083:DESCRIPTION:Possibly (could be a cleansing error):LINK:https://www.cve.org/CVERecord?id=CVE-1999-1083::REFERENCE:CVE-2004-0815:DESCRIPTION:/./////etc cleansed to .///etc then /etc:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0815::REFERENCE:CVE-2002-0112:DESCRIPTION:Server allows remote attackers to view password protected files via /./ in the URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0112::REFERENCE:CVE-2004-0696:DESCRIPTION:List directories using desired path and *:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0696::REFERENCE:CVE-2002-0433:DESCRIPTION:List files in web server using *.ext:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0433::REFERENCE:CVE-2001-1152:DESCRIPTION:Proxy allows remote attackers to bypass denylist restrictions and connect to unauthorized web servers by modifying the requested URL, including (1) a // (double slash), (2) a /SUBDIR/.. where the desired file is in the parentdir, (3) a /./, or (4) URL-encoded characters.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1152::REFERENCE:CVE-2000-0191:DESCRIPTION:application check access for restricted URL before canonicalization:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0191::REFERENCE:CVE-2005-1366:DESCRIPTION:CGI source disclosure using dirname/../cgi-bin:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1366::REFERENCE:CVE-1999-0012:DESCRIPTION:Multiple web servers allow restriction bypass using 8.3 names instead of long names:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0012::REFERENCE:CVE-2001-0795:DESCRIPTION:Source code disclosure using 8.3 file name.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0795::REFERENCE:CVE-2005-0471:DESCRIPTION:Multi-Factor Vulnerability. Product generates temporary filenames using long filenames, which become predictable in 8.3 format.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0471::
| null |
::File or Directory::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Path Equivalence::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO02-C:ENTRY NAME:Canonicalize path names originating from untrusted sources::
|
::3::
|
::TYPE:Relationship:NOTE:Some of these manipulations could be effective in path traversal issues, too.::
| null | 41
|
Improper Link Resolution Before File Access ('Link Following')
|
Base
|
Draft
|
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
| null |
::NATURE:ChildOf:CWE ID:706:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:706:VIEW ID:1003:ORDINAL:Primary::
|
::ORDINALITY:Resultant::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Windows:OPERATING SYSTEM PREVALENCE:Sometimes::OPERATING SYSTEM CLASS:Unix:OPERATING SYSTEM PREVALENCE:Often::
|
::Soft links are a UNIX term that is synonymous with simple shortcuts on Windows-based platforms.::
|
::TERM:insecure temporary file:DESCRIPTION:Some people use the phrase insecure temporary file when referring to a link following weakness, but other weaknesses can produce insecure temporary files without any symlink involvement at all.::TERM:Zip Slip:DESCRIPTION:Zip slip is an attack that uses file archives (e.g., ZIP, tar, rar, etc.) that contain filenames with path traversal sequences that cause the files to be written outside of the directory under which the archive is expected to be extracted [REF-1282]. It is most commonly used for relative path traversal (CWE-23) and link following (CWE-59).::
|
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Access Control:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:IMPACT:Bypass Protection Mechanism:NOTE:An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism then an attacker may be able to bypass the mechanism.::SCOPE:Other:IMPACT:Execute Unauthorized Code or Commands:NOTE:Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since a .LNK file can be uploaded like a normal file. This can enable remote execution.::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Bytecode Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege:DESCRIPTION:Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.::
|
::REFERENCE:CVE-1999-1386:DESCRIPTION:Some versions of Perl follow symbolic links when running with the -e option, which allows local users to overwrite arbitrary files via a symlink attack.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1386::REFERENCE:CVE-2000-1178:DESCRIPTION:Text editor follows symbolic links when creating a rescue copy during an abnormal exit, which allows local users to overwrite the files of other users.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1178::REFERENCE:CVE-2004-0217:DESCRIPTION:Antivirus update allows local users to create or append to arbitrary files via a symlink attack on a logfile.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0217::REFERENCE:CVE-2003-0517:DESCRIPTION:Symlink attack allows local users to overwrite files.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0517::REFERENCE:CVE-2004-0689:DESCRIPTION:Window manager does not properly handle when certain symbolic links point to stale locations, which could allow local users to create or truncate arbitrary files.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0689::REFERENCE:CVE-2005-1879:DESCRIPTION:Second-order symlink vulnerabilities:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1879::REFERENCE:CVE-2005-1880:DESCRIPTION:Second-order symlink vulnerabilities:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1880::REFERENCE:CVE-2005-1916:DESCRIPTION:Symlink in Python program:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1916::REFERENCE:CVE-2000-0972:DESCRIPTION:Setuid product allows file reading by replacing a file being edited with a symlink to the targeted file, leaking the result in error messages when parsing fails.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0972::REFERENCE:CVE-2005-0824:DESCRIPTION:Signal causes a dump that follows symlinks.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0824::REFERENCE:CVE-2001-1494:DESCRIPTION:Hard link attack, file overwrite; interesting because program checks against soft links:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1494::REFERENCE:CVE-2002-0793:DESCRIPTION:Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0793::REFERENCE:CVE-2003-0578:DESCRIPTION:Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0578::REFERENCE:CVE-1999-0783:DESCRIPTION:Operating system allows local users to conduct a denial of service by creating a hard link from a device special file to a file on an NFS file system.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0783::REFERENCE:CVE-2004-1603:DESCRIPTION:Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1603::REFERENCE:CVE-2004-1901:DESCRIPTION:Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1901::REFERENCE:CVE-2005-1111:DESCRIPTION:Hard link race condition:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1111::REFERENCE:CVE-2000-0342:DESCRIPTION:Mail client allows remote attackers to bypass the user warning for executable attachments such as .exe, .com, and .bat by using a .lnk file that refers to the attachment, aka Stealth Attachment.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0342::REFERENCE:CVE-2001-1042:DESCRIPTION:FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1042::REFERENCE:CVE-2001-1043:DESCRIPTION:FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1043::REFERENCE:CVE-2005-0587:DESCRIPTION:Browser allows remote malicious web sites to overwrite arbitrary files by tricking the user into downloading a .LNK (link) file twice, which overwrites the file that was referenced in the first .LNK file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0587::REFERENCE:CVE-2001-1386:DESCRIPTION:.LNK. - .LNK with trailing dot:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1386::REFERENCE:CVE-2003-1233:DESCRIPTION:Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1233::REFERENCE:CVE-2002-0725:DESCRIPTION:File system allows local attackers to hide file usage activities via a hard link to the target file, which causes the link to be recorded in the audit trail instead of the target file.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0725::REFERENCE:CVE-2003-0844:DESCRIPTION:Web server plugin allows local users to overwrite arbitrary files via a symlink attack on predictable temporary filenames.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0844::REFERENCE:CVE-2015-3629:DESCRIPTION:A Libcontainer used in Docker Engine allows local users to escape containerization and write to an arbitrary file on the host system via a symlink attack in an image when respawning a container.:LINK:https://www.cve.org/CVERecord?id=CVE-2015-3629::REFERENCE:CVE-2021-21272:DESCRIPTION:Zip Slip vulnerability in Go-based Open Container Initiative (OCI) registries product allows writing arbitrary files outside intended directory via symbolic links or hard links in a gzipped tarball.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-21272::REFERENCE:CVE-2020-27833:DESCRIPTION:Zip Slip vulnerability in container management product allows writing arbitrary files outside intended directory via a container image (.tar format) with filenames that are symbolic links that point to other files within the same tar file; however, the files being pointed to can also be symbolic links to destinations outside the intended directory, bypassing the initial check.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-27833::
|
::File Processing::
|
::File or Directory::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Link Following::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO02-C:ENTRY NAME:Canonicalize path names originating from untrusted sources::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS01-C:ENTRY NAME:Check for the existence of links when dealing with files::TAXONOMY NAME:SEI CERT Perl Coding Standard:ENTRY ID:FIO01-PL:ENTRY NAME:Do not operate on files that can be modified by untrusted users:MAPPING FIT:CWE More Specific::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP18:ENTRY NAME:Link in resource name resolution::
|
::132::17::35::76::
|
::TYPE:Theoretical:NOTE:Link following vulnerabilities are Multi-factor Vulnerabilities (MFV). They are the combination of multiple elements: file or directory permissions, filename predictability, race conditions, and in some cases, a design limitation in which there is no mechanism for performing atomic file creation operations. Some potential factors are race conditions, permissions, and predictability.::
| null | 59
|
Improper Handling of File Names that Identify Virtual Resources
|
Base
|
Draft
|
The product does not handle or incorrectly handles a file name that identifies a virtual resource that is not directly specified within the directory that is associated with the file name, causing the product to perform file-based operations on a resource that is not a file.
|
Virtual file names are represented like normal file names, but they are effectively aliases for other resources that do not behave like normal files. Depending on their functionality, they could be alternate entities. They are not necessarily listed in directories.
|
::NATURE:ChildOf:CWE ID:706:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::PHASE:Operation::
| null | null |
::SCOPE:Other:IMPACT:Other::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Bytecode Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-1999-0278:DESCRIPTION:In IIS, remote attackers can obtain source code for ASP files by appending ::$DATA to the URL.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0278::REFERENCE:CVE-2004-1084:DESCRIPTION:Server allows remote attackers to read files and resource fork content via HTTP requests to certain special file names related to multiple data streams in HFS+.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1084::REFERENCE:CVE-2002-0106:DESCRIPTION:Server allows remote attackers to cause a denial of service via a series of requests to .JSP files that contain an MS-DOS device name.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0106::
|
::File Processing::
|
::File or Directory::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Virtual Files::
| null | null | null | 66
|
External Control of File Name or Path
|
Base
|
Draft
|
The product allows user input to control or influence paths or file names that are used in filesystem operations.
|
This could allow an attacker to access or modify system files or other files that are critical to the application. Path manipulation errors occur when the following two conditions are met: 1. An attacker can specify a path used in an operation on the filesystem. 2. By specifying the resource, the attacker gains a capability that would not otherwise be permitted. For example, the program may give the attacker the ability to overwrite the specified file or run with a configuration controlled by the attacker.
|
::NATURE:ChildOf:CWE ID:642:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:610:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:22:VIEW ID:1000::NATURE:CanPrecede:CWE ID:41:VIEW ID:1000::NATURE:CanPrecede:CWE ID:98:VIEW ID:1000::NATURE:CanPrecede:CWE ID:434:VIEW ID:1000::NATURE:CanPrecede:CWE ID:59:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Unix:OPERATING SYSTEM PREVALENCE:Often::OPERATING SYSTEM CLASS:Windows:OPERATING SYSTEM PREVALENCE:Often::OPERATING SYSTEM CLASS:macOS:OPERATING SYSTEM PREVALENCE:Often::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:NOTE:The application can operate on unexpected files. Confidentiality is violated when the targeted filename is not directly readable by the attacker.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Files or Directories:IMPACT:Execute Unauthorized Code or Commands:NOTE:The application can operate on unexpected files. This may violate integrity if the filename is written to, or if the filename is for a program or other form of executable code.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (Other):NOTE:The application can operate on unexpected files. Availability can be violated if the attacker specifies an unexpected file that the application modifies. Availability can also be affected if the attacker specifies a filename for a large file, or points to a special device or a file that does not have the format that the application expects.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:The external control or influence of filenames can often be detected using automated static analysis that models data flow within the product. Automated static analysis might not be able to recognize when proper input validation is being performed, leading to false positives - i.e., warnings that do not have any security consequences or require any code changes.::
|
::PHASE:Architecture and Design:DESCRIPTION:When the set of filenames is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames, and reject all other inputs. For example, ID 1 could map to inbox.txt and ID 2 could map to profile.txt. Features such as the ESAPI AccessReferenceMap provide this capability.::PHASE:Architecture and Design Operation:DESCRIPTION:Run your code in a jail or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict all access to files within a particular directory. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.::PHASE:Architecture and Design: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:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single . character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as / to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434. Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering / is insufficient protection if the filesystem also supports the use of as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if ../ sequences are removed from the .../...// string in a sequential fashion, two instances of ../ would be removed from the original string, but the remaining characters would still form the ../ string.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes .. sequences and symbolic links (CWE-23, CWE-59).::PHASE:Installation Operation:DESCRIPTION:Use OS-level permissions and run as a low-privileged user to limit the scope of any successful attack.::PHASE:Operation Implementation:DESCRIPTION:If you are using PHP, configure your application so that it does not use register_globals. During implementation, develop your application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.::PHASE:Testing:DESCRIPTION:Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.::
|
::REFERENCE:CVE-2022-45918:DESCRIPTION:Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using ../ sequences (CWE-24):LINK:https://www.cve.org/CVERecord?id=CVE-2022-45918::REFERENCE:CVE-2008-5748:DESCRIPTION:Chain: external control of values for user's desired language and theme enables path traversal.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5748::REFERENCE:CVE-2008-5764:DESCRIPTION:Chain: external control of user's target language enables remote file inclusion.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5764::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Path Manipulation::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP16:ENTRY NAME:Path Traversal::
|
::13::267::64::72::76::78::79::80::
|
::TYPE:Maintenance:NOTE:CWE-114 is a Class, but it is listed a child of CWE-73 in view 1000. This suggests some abstraction problems that should be resolved in future versions.::TYPE:Relationship:NOTE:The external control of filenames can be the primary link in chains with other file-related weaknesses, as seen in the CanPrecede relationships. This is because software systems use files for many different purposes: to execute programs, load code libraries, to store application data, to store configuration settings, record temporary data, act as signals or semaphores to other processes, etc. However, those weaknesses do not always require external control. For example, link-following weaknesses (CWE-59) often involve pathnames that are not controllable by the attacker at all. The external control can be resultant from other issues. For example, in PHP applications, the register_globals setting can allow an attacker to modify variables that the programmer thought were immutable, enabling file inclusion (CWE-98) and path traversal (CWE-22). Operating with excessive privileges (CWE-250) might allow an attacker to specify an input filename that is not directly readable by the attacker, but is accessible to the privileged program. A buffer overflow (CWE-119) might give an attacker control over nearby memory locations that are related to pathnames, but were not directly modifiable by the attacker.::
| null | 73
|
Improper Neutralization of Equivalent Special Elements
|
Base
|
Draft
|
The product correctly neutralizes certain special elements, but it improperly neutralizes equivalent special elements.
|
The product may have a fixed list of special characters it believes is complete. However, there may be alternate encodings, or representations that also have the same meaning. For example, the product may filter out a leading slash (/) to prevent absolute path names, but does not account for a tilde (~) followed by a user name, which on some *nix systems could be expanded to an absolute pathname. Alternately, the product might filter a dangerous -e command-line switch when calling an external program, but it might not account for --exec or other switches that have the same semantics.
|
::NATURE:ChildOf:CWE ID:75:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Other:IMPACT:Other::
| null |
::PHASE:Requirements:DESCRIPTION:Programming languages and supporting technologies might be chosen which are not subject to these issues.::PHASE:Implementation:DESCRIPTION:Utilize an appropriate mix of allowlist and denylist parsing to filter equivalent special element syntax from all input.::
| null | null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Equivalent Special Element Injection::
| null | null | null | 76
|
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
|
Base
|
Stable
|
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
|
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system(nslookup [HOSTNAME]) to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing. The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use exec([COMMAND]) to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line. From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
|
::NATURE:ChildOf:CWE ID:77:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:77:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:77:VIEW ID:1340:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:88:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Shell injection::TERM:Shell metacharacters::
|
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Non-Repudiation:IMPACT:Execute Unauthorized Code or Commands:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:IMPACT:Read Application Data:IMPACT:Modify Application Data:IMPACT:Hide Activities:NOTE:Attackers could execute unauthorized commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.::
|
::METHOD:Automated Static Analysis: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 might not be able to recognize when proper input validation is being performed, leading to false positives - i.e., warnings that do not have any security consequences or require any code changes. Automated static analysis might not be able to detect the usage of custom API functions or third-party libraries that indirectly invoke OS commands, leading to false negatives - especially if the API/library code is not available for analysis.::METHOD:Automated Dynamic Analysis:DESCRIPTION:This weakness can be detected using dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.:EFFECTIVENESS:Moderate::METHOD:Manual Static Analysis:DESCRIPTION:Since this weakness does not typically appear frequently within a single software package, manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all potentially-vulnerable operations can be assessed within limited time constraints.:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:If at all possible, use library calls rather than external processes to recreate the desired functionality.::PHASE:Architecture and Design Operation:STRATEGY:Sandbox or Jail: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.:EFFECTIVENESS:Limited::PHASE:Architecture and Design:STRATEGY:Attack Surface Reduction:DESCRIPTION:For any data that will be used to generate a command to be executed, keep as much of that data out of external control as possible. For example, in web applications, this may require storing the data locally in the session's state instead of sending it out to the client in a hidden form field.::PHASE:Architecture and Design: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:Architecture and Design:STRATEGY:Libraries or Frameworks: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.::PHASE:Implementation:STRATEGY:Output Encoding: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 allowlist (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:DESCRIPTION:If the program to be executed allows arguments to be specified within an input file or from standard input, then consider using that mode to pass arguments instead of the command line.::PHASE:Architecture and Design:STRATEGY:Parameterization: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. Some languages offer multiple functions that can be used to invoke commands. Where possible, identify any function that invokes a command shell using a single string, and replace it with a function that requires individual arguments. These functions typically perform appropriate quoting and filtering of arguments. For example, in C, the system() function accepts a string that contains the entire command to be executed, whereas execl(), execve(), and others require an array of strings, one for each argument. In Windows, CreateProcess() only accepts one command at a time. In Perl, if system() is provided with an array of arguments, then it will quote each of the arguments.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When constructing OS command strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping. Note that proper output encoding, escaping, and quoting is the most effective solution for preventing OS command injection, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent OS command injection, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, when invoking a mail program, you might need to allow the subject field to contain otherwise-dangerous inputs like ; and > characters, which would need to be escaped or otherwise handled. In this case, stripping the character might reduce the risk of OS command injection, but it would produce incorrect behavior because the subject field would not be recorded as the user intended. This might seem to be a minor inconvenience, but it could be more important when the program relies on well-structured subject lines in order to pass messages to other components. Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding is still likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still a useful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provide other security benefits that proper encoding does not address.::PHASE:Architecture and Design:STRATEGY:Enforcement by Conversion: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:Operation:STRATEGY:Compilation or Build Hardening:DESCRIPTION:Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's -T switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).::PHASE:Operation:STRATEGY:Environment Hardening:DESCRIPTION:Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's -T switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).::PHASE:Implementation:DESCRIPTION:Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not. In the context of OS Command Injection, error information passed back to the user might reveal whether an OS command is being executed and possibly which command is being used.::PHASE:Operation:STRATEGY:Sandbox or Jail:DESCRIPTION:Use runtime policy enforcement to create an allowlist of allowable commands, then prevent use of any command that does not appear in the allowlist. Technologies such as AppArmor are available to do this.::PHASE:Operation:STRATEGY:Firewall:DESCRIPTION:Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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:Operation Implementation:STRATEGY:Environment Hardening:DESCRIPTION:When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.::
|
::REFERENCE:CVE-2020-10987:DESCRIPTION:OS command injection in Wi-Fi router, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-10987::REFERENCE:CVE-2020-10221:DESCRIPTION:Template functionality in network configuration management tool allows OS command injection, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-10221::REFERENCE:CVE-2020-9054:DESCRIPTION:Chain: improper input validation (CWE-20) in username parameter, leading to OS command injection (CWE-78), as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-9054::REFERENCE:CVE-1999-0067:DESCRIPTION:Canonical example of OS command injection. CGI program does not neutralize | metacharacter when invoking a phonebook program.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0067::REFERENCE:CVE-2001-1246:DESCRIPTION:Language interpreter's mail function accepts another argument that is concatenated to a string used in a dangerous popen() call. Since there is no neutralization of this argument, both OS Command Injection (CWE-78) and Argument Injection (CWE-88) are possible.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1246::REFERENCE:CVE-2002-0061:DESCRIPTION:Web server allows command execution using | (pipe) character.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0061::REFERENCE:CVE-2003-0041:DESCRIPTION:FTP client does not filter | from filenames returned by the server, allowing for OS command injection.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0041::REFERENCE:CVE-2008-2575:DESCRIPTION:Shell metacharacters in a filename in a ZIP archive:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2575::REFERENCE:CVE-2002-1898:DESCRIPTION:Shell metacharacters in a telnet:// link are not properly handled when the launching application processes the link.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1898::REFERENCE:CVE-2008-4304:DESCRIPTION:OS command injection through environment variable.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4304::REFERENCE:CVE-2008-4796:DESCRIPTION:OS command injection through https:// URLs:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4796::REFERENCE:CVE-2007-3572:DESCRIPTION:Chain: incomplete denylist for OS command injection:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3572::REFERENCE:CVE-2012-1988:DESCRIPTION:Product allows remote users to execute arbitrary commands by creating a file whose pathname contains shell metacharacters.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-1988::
|
::Program Invocation::
|
::System Process::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:OS Command Injection::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A3:ENTRY NAME:Malicious File Execution:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A6:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ENV03-C:ENTRY NAME:Sanitize the environment when invoking external programs::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ENV33-C:ENTRY NAME:Do not call system():MAPPING FIT:CWE More Specific::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR02-C:ENTRY NAME:Sanitize data passed to complex subsystems::TAXONOMY NAME:WASC:ENTRY ID:31:ENTRY NAME:OS Commanding::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:IDS07-J:ENTRY NAME:Do not pass untrusted, unsanitized data to the Runtime.exec() method::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-78::
|
::108::15::43::6::88::
|
::TYPE:Terminology:NOTE:The OS command injection phrase carries different meanings to different people. For some people, it only refers to cases in which the attacker injects command separators into arguments for an application-controlled program that is being invoked. For some people, it refers to any type of attack that can allow the attacker to execute OS commands of their own choosing. This usage could include untrusted search path weaknesses (CWE-426) that cause the application to find and execute an attacker-controlled program. Further complicating the issue is the case when argument injection (CWE-88) allows alternate command-line switches or options to be inserted into the command line, such as an -exec switch whose purpose may be to execute the subsequent argument as a command (this -exec switch exists in the UNIX find command, for example). In this latter case, however, CWE-88 could be regarded as the primary weakness in a chain with CWE-78.::TYPE:Research Gap:NOTE:More investigation is needed into the distinction between the OS command injection variants, including the role with argument injection (CWE-88). Equivalent distinctions may exist in other injection-related problems such as SQL injection.::
| null | 78
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
Base
|
Stable
|
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as drive-by hacking. In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
|
::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:494:VIEW ID:1000::NATURE:PeerOf:CWE ID:352:VIEW ID:1000::
|
::ORDINALITY:Resultant::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Web Based:TECHNOLOGY PREVALENCE:Often::
|
::The Same Origin Policy states that browsers should limit the resources accessible to scripts running on a given web site, or origin, to the resources associated with that web site on the client-side, and not the client-side resources of any other sites or origins. The goal is to prevent one site from being able to modify or read the contents of an unrelated site. Since the World Wide Web involves interactions between many sites, this policy is important for browsers to enforce. When referring to XSS, the Domain of a website is roughly equivalent to the resources associated with that website on the client-side of the connection. That is, the domain can be thought of as all resources the browser is storing for the user's interactions with this particular site.::
|
::TERM:XSS:DESCRIPTION:A common abbreviation for Cross-Site Scripting.::TERM:HTML Injection:DESCRIPTION:Used as a synonym of stored (Type 2) XSS.::TERM:CSS:DESCRIPTION:In the early years after initial discovery of XSS, CSS was a commonly-used acronym. However, this would cause confusion with Cascading Style Sheets, so usage of this acronym has declined significantly.::
|
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:SCOPE:Confidentiality:IMPACT:Bypass Protection Mechanism:IMPACT:Read Application Data:NOTE:The most common attack performed with cross-site scripting involves the disclosure of information stored in user cookies. Typically, a malicious user will craft a client-side script, which -- when parsed by a web browser -- performs some activity (such as sending all site cookies to a given E-mail address). This script will be loaded and run by each user visiting the web site. Since the site requesting to run the script has access to the cookies in question, the malicious script does also.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:In some circumstances it may be possible to run arbitrary code on a victim's computer when cross-site scripting is combined with other flaws.::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Bypass Protection Mechanism:IMPACT:Read Application Data:NOTE:The consequence of an XSS attack is the same regardless of whether it is stored or reflected. The difference is in how the payload arrives at the server. XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. Some cross-site scripting vulnerabilities can be exploited to manipulate or steal cookies, create requests that can be mistaken for those of a valid user, compromise confidential information, or execute malicious code on the end user systems for a variety of nefarious purposes. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirecting the user to some other page or site, running Active X controls (under Microsoft Internet Explorer) from sites that a user perceives as trustworthy, and modifying presentation of content.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Use automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis to minimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible, especially when multiple components are involved.:EFFECTIVENESS:Moderate::METHOD:Black Box:DESCRIPTION:Use the XSS Cheat Sheet [REF-714] or automated test-generation tools to help launch a wide variety of attacks against your web application. The Cheat Sheet contains many subtle XSS variations that are specifically targeted against weak XSS defenses.:EFFECTIVENESS:Moderate::
|
::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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 of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.::PHASE:Implementation Architecture and Design: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. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: HTML body Element attributes (such as src=XYZ) URIs JavaScript sections Cascading Style Sheets and style property etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed.::PHASE:Architecture and Design Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.:EFFECTIVENESS:Limited::PHASE:Architecture and Design: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:Architecture and Design:STRATEGY:Parameterization: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.::PHASE:Implementation:STRATEGY:Output Encoding: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. The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.::PHASE:Implementation:DESCRIPTION:With Struts, write all data from form beans with the bean's filter attribute set to true.::PHASE:Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XMLHTTPRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.:EFFECTIVENESS:Defense in Depth::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When dynamically constructing web pages, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. All input should be validated and cleansed, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. It is common to see data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended. Note that proper output encoding, escaping, and quoting is the most effective solution for preventing XSS, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent XSS, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, in a chat application, the heart emoticon (<3) would likely pass the validation step, since it is commonly used. However, it cannot be directly inserted into the web page because it contains the < character, which would need to be escaped or otherwise handled. In this case, stripping the < might reduce the risk of XSS, but it would produce incorrect behavior because the emoticon would not be recorded. This might seem to be a minor inconvenience, but it would be more important in a mathematical forum that wants to represent inequalities. Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding is still likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still a useful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provide other security benefits that proper encoding does not address. Ensure that you perform input validation at well-defined interfaces within the application. This will help protect the application even if a component is reused or moved elsewhere.::PHASE:Architecture and Design:STRATEGY:Enforcement by Conversion: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:Operation:STRATEGY:Firewall:DESCRIPTION:Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.:EFFECTIVENESS:Moderate::PHASE:Operation Implementation:STRATEGY:Environment Hardening:DESCRIPTION:When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.::
|
::REFERENCE:CVE-2021-25926:DESCRIPTION:Python Library Manager did not sufficiently neutralize a user-supplied search term, allowing reflected XSS.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-25926::REFERENCE:CVE-2021-25963:DESCRIPTION:Python-based e-commerce platform did not escape returned content on error pages, allowing for reflected Cross-Site Scripting attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-25963::REFERENCE:CVE-2021-1879:DESCRIPTION:Universal XSS in mobile operating system, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-1879::REFERENCE:CVE-2020-3580:DESCRIPTION:Chain: improper input validation (CWE-20) in firewall product leads to XSS (CWE-79), as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-3580::REFERENCE:CVE-2014-8958:DESCRIPTION:Admin GUI allows XSS through cookie.:LINK:https://www.cve.org/CVERecord?id=CVE-2014-8958::REFERENCE:CVE-2017-9764:DESCRIPTION:Web stats program allows XSS through crafted HTTP header.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-9764::REFERENCE:CVE-2014-5198:DESCRIPTION:Web log analysis product allows XSS through crafted HTTP Referer header.:LINK:https://www.cve.org/CVERecord?id=CVE-2014-5198::REFERENCE:CVE-2008-5080:DESCRIPTION:Chain: protection mechanism failure allows XSS:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5080::REFERENCE:CVE-2006-4308:DESCRIPTION:Chain: incomplete denylist (CWE-184) only checks javascript: tag, allowing XSS (CWE-79) using other tags:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4308::REFERENCE:CVE-2007-5727:DESCRIPTION:Chain: incomplete denylist (CWE-184) only removes SCRIPT tags, enabling XSS (CWE-79):LINK:https://www.cve.org/CVERecord?id=CVE-2007-5727::REFERENCE:CVE-2008-5770:DESCRIPTION:Reflected XSS using the PATH_INFO in a URL:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5770::REFERENCE:CVE-2008-4730:DESCRIPTION:Reflected XSS not properly handled when generating an error message:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4730::REFERENCE:CVE-2008-5734:DESCRIPTION:Reflected XSS sent through email message.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5734::REFERENCE:CVE-2008-0971:DESCRIPTION:Stored XSS in a security product.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-0971::REFERENCE:CVE-2008-5249:DESCRIPTION:Stored XSS using a wiki page.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5249::REFERENCE:CVE-2006-3568:DESCRIPTION:Stored XSS in a guestbook application.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-3568::REFERENCE:CVE-2006-3211:DESCRIPTION:Stored XSS in a guestbook application using a javascript: URI in a bbcode img tag.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-3211::REFERENCE:CVE-2006-3295:DESCRIPTION:Chain: library file is not protected against a direct request (CWE-425), leading to reflected XSS (CWE-79).:LINK:https://www.cve.org/CVERecord?id=CVE-2006-3295::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Cross-site scripting (XSS)::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Cross-site Scripting::TAXONOMY NAME:CLASP:ENTRY NAME:Cross-site scripting::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A1:ENTRY NAME:Cross Site Scripting (XSS):MAPPING FIT:Exact::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:A4:ENTRY NAME:Cross-Site Scripting (XSS) Flaws:MAPPING FIT:Exact::TAXONOMY NAME:WASC:ENTRY ID:8:ENTRY NAME:Cross-site Scripting::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-79::
|
::209::588::591::592::63::85::
|
::TYPE:Relationship:NOTE:There can be a close relationship between XSS and CSRF (CWE-352). An attacker might use CSRF in order to trick the victim into submitting requests to the server in which the requests contain an XSS payload. A well-known example of this was the Samy worm on MySpace [REF-956]. The worm used XSS to insert malicious HTML sequences into a user's profile and add the attacker as a MySpace friend. MySpace friends of that victim would then execute the payload to modify their own profiles, causing the worm to propagate exponentially. Since the victims did not intentionally insert the malicious script themselves, CSRF was a root cause.::TYPE:Applicable Platform:NOTE:XSS flaws are very common in web applications, since they require a great deal of developer discipline to avoid them.::
| null | 79
|
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
|
Base
|
Draft
|
The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.
|
When creating commands using interpolation into a string, developers may assume that only the arguments/options that they specify will be processed. This assumption may be even stronger when the programmer has encoded the command in a way that prevents separate commands from being provided maliciously, e.g. in the case of shell metacharacters. When constructing the command, the developer may use whitespace or other delimiters that are required to separate arguments when the command. However, if an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer. The attacker may then be able to change the behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences.
|
::NATURE:ChildOf:CWE ID:77:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:77:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:77:VIEW ID:1340:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:PHP:LANGUAGE PREVALENCE:Often::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Other:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Alter Execution Logic:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:An attacker could include arguments that allow unintended commands or code to be executed, allow sensitive data to be read or modified or could cause other unintended behavior.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Parameterization:DESCRIPTION:Where possible, avoid building a single string that contains the command and its arguments. Some languages or frameworks have functions that support specifying independent arguments, e.g. as an array, which is used to automatically perform the appropriate quoting or escaping while building the command. For example, in PHP, escapeshellarg() can be used to escape a single argument to system(), or exec() can be called with an array of arguments. In C, code can often be refactored from using system() - which accepts a single string - to using exec(), which requires separate function arguments for each parameter.:EFFECTIVENESS:High::PHASE:Architecture and Design:STRATEGY:Input Validation:DESCRIPTION:Understand all the potential areas where untrusted inputs can enter your product: parameters or arguments, cookies, anything read from the network, environment variables, request headers as well as content, URL components, e-mail, files, databases, and any external systems that provide data to the application. Perform input validation at well-defined interfaces.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:DESCRIPTION:Directly convert your input type into the expected data type, such as using a conversion function that translates a string into a number. After converting to the expected data type, ensure that the input's values fall within the expected range of allowable values and that multi-field consistencies are maintained.::PHASE:Implementation:DESCRIPTION:Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180, CWE-181). Make sure that your application does not inadvertently decode the same input twice (CWE-174). Such errors could be used to bypass allowlist schemes by introducing dangerous inputs after they have been checked. Use libraries such as the OWASP ESAPI Canonicalization control. Consider performing repeated canonicalization until your input does not change any more. This will avoid double-decoding and similar scenarios, but it might inadvertently modify inputs that are allowed to contain properly-encoded dangerous content.::PHASE:Implementation: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.::PHASE:Implementation:DESCRIPTION:When your application combines data from multiple sources, perform the validation after the sources have been combined. The individual data elements may pass the validation step but violate the intended restrictions after they have been combined.::PHASE:Testing:DESCRIPTION:Use automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis to minimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible.::PHASE:Testing:DESCRIPTION:Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.::
|
::REFERENCE:CVE-2022-36069:DESCRIPTION:Python-based dependency management tool avoids OS command injection when generating Git commands but allows injection of optional arguments with input beginning with a dash, potentially allowing for code execution.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-36069::REFERENCE:CVE-1999-0113:DESCRIPTION:Canonical Example - -froot argument is passed on to another program, where the -f causes execution as user root:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0113::REFERENCE:CVE-2001-0150:DESCRIPTION:Web browser executes Telnet sessions using command line arguments that are specified by the web site, which could allow remote attackers to execute arbitrary commands.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0150::REFERENCE:CVE-2001-0667:DESCRIPTION:Web browser allows remote attackers to execute commands by spawning Telnet with a log file option on the command line and writing arbitrary code into an executable file which is later executed.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0667::REFERENCE:CVE-2002-0985:DESCRIPTION:Argument injection vulnerability in the mail function for PHP may allow attackers to bypass safe mode restrictions and modify command line arguments to the MTA (e.g. sendmail) possibly executing commands.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0985::REFERENCE:CVE-2003-0907:DESCRIPTION:Help and Support center in windows does not properly validate HCP URLs, which allows remote attackers to execute arbitrary code via quotation marks in an hcp:// URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0907::REFERENCE:CVE-2004-0121:DESCRIPTION:Mail client does not sufficiently filter parameters of mailto: URLs when using them as arguments to mail executable, which allows remote attackers to execute arbitrary programs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0121::REFERENCE:CVE-2004-0473:DESCRIPTION:Web browser doesn't filter - when invoking various commands, allowing command-line switches to be specified.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0473::REFERENCE:CVE-2004-0480:DESCRIPTION:Mail client allows remote attackers to execute arbitrary code via a URI that uses a UNC network share pathname to provide an alternate configuration file.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0480::REFERENCE:CVE-2004-0489:DESCRIPTION:SSH URI handler for web browser allows remote attackers to execute arbitrary code or conduct port forwarding via the a command line option.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0489::REFERENCE:CVE-2004-0411:DESCRIPTION:Web browser doesn't filter - when invoking various commands, allowing command-line switches to be specified.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0411::REFERENCE:CVE-2005-4699:DESCRIPTION:Argument injection vulnerability in TellMe 1.2 and earlier allows remote attackers to modify command line arguments for the Whois program and obtain sensitive information via -- style options in the q_Host parameter.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-4699::REFERENCE:CVE-2006-1865:DESCRIPTION:Beagle before 0.2.5 can produce certain insecure command lines to launch external helper applications while indexing, which allows attackers to execute arbitrary commands. NOTE: it is not immediately clear whether this issue involves argument injection, shell metacharacters, or other issues.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-1865::REFERENCE:CVE-2006-2056:DESCRIPTION:Argument injection vulnerability in Internet Explorer 6 for Windows XP SP2 allows user-assisted remote attackers to modify command line arguments to an invoked mail client via (double quote) characters in a mailto: scheme handler, as demonstrated by launching Microsoft Outlook with an arbitrary filename as an attachment. NOTE: it is not clear whether this issue is implementation-specific or a problem in the Microsoft API.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2056::REFERENCE:CVE-2006-2057:DESCRIPTION:Argument injection vulnerability in Mozilla Firefox 1.0.6 allows user-assisted remote attackers to modify command line arguments to an invoked mail client via (double quote) characters in a mailto: scheme handler, as demonstrated by launching Microsoft Outlook with an arbitrary filename as an attachment. NOTE: it is not clear whether this issue is implementation-specific or a problem in the Microsoft API.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2057::REFERENCE:CVE-2006-2058:DESCRIPTION:Argument injection vulnerability in Avant Browser 10.1 Build 17 allows user-assisted remote attackers to modify command line arguments to an invoked mail client via (double quote) characters in a mailto: scheme handler, as demonstrated by launching Microsoft Outlook with an arbitrary filename as an attachment. NOTE: it is not clear whether this issue is implementation-specific or a problem in the Microsoft API.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2058::REFERENCE:CVE-2006-2312:DESCRIPTION:Argument injection vulnerability in the URI handler in Skype 2.0.*.104 and 2.5.*.0 through 2.5.*.78 for Windows allows remote authorized attackers to download arbitrary files via a URL that contains certain command-line switches.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2312::REFERENCE:CVE-2006-3015:DESCRIPTION:Argument injection vulnerability in WinSCP 3.8.1 build 328 allows remote attackers to upload or download arbitrary files via encoded spaces and double-quote characters in a scp or sftp URI.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-3015::REFERENCE:CVE-2006-4692:DESCRIPTION:Argument injection vulnerability in the Windows Object Packager (packager.exe) in Microsoft Windows XP SP1 and SP2 and Server 2003 SP1 and earlier allows remote user-assisted attackers to execute arbitrary commands via a crafted file with a / (slash) character in the filename of the Command Line property, followed by a valid file extension, which causes the command before the slash to be executed, aka Object Packager Dialogue Spoofing Vulnerability.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4692::REFERENCE:CVE-2006-6597:DESCRIPTION:Argument injection vulnerability in HyperAccess 8.4 allows user-assisted remote attackers to execute arbitrary vbscript and commands via the /r option in a telnet:// URI, which is configured to use hawin32.exe.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-6597::REFERENCE:CVE-2007-0882:DESCRIPTION:Argument injection vulnerability in the telnet daemon (in.telnetd) in Solaris 10 and 11 (SunOS 5.10 and 5.11) misinterprets certain client -f sequences as valid requests for the login program to skip authentication, which allows remote attackers to log into certain accounts, as demonstrated by the bin account.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-0882::REFERENCE:CVE-2001-1246:DESCRIPTION:Language interpreter's mail function accepts another argument that is concatenated to a string used in a dangerous popen() call. Since there is no neutralization of this argument, both OS Command Injection (CWE-78) and Argument Injection (CWE-88) are possible.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1246::REFERENCE:CVE-2019-13475:DESCRIPTION:Argument injection allows execution of arbitrary commands by injecting a -exec option, which is executed by the command.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-13475::REFERENCE:CVE-2016-10033:DESCRIPTION:Argument injection in mail-processing function allows writing unxpected files and executing programs using tecnically-valid email addresses that insert -o and -X switches.:LINK:https://www.cve.org/CVERecord?id=CVE-2016-10033::
| null |
::System Process::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Argument Injection or Modification::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ENV03-C:ENTRY NAME:Sanitize the environment when invoking external programs::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ENV33-C:ENTRY NAME:Do not call system():MAPPING FIT:Imprecise::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR02-C:ENTRY NAME:Sanitize data passed to complex subsystems::TAXONOMY NAME:WASC:ENTRY ID:30:ENTRY NAME:Mail Command Injection::
|
::137::174::41::460::88::
|
::TYPE:Relationship:NOTE:At one layer of abstraction, this can overlap other weaknesses that have whitespace problems, e.g. injection of javascript into attributes of HTML tags.::
| null | 88
|
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
|
Base
|
Stable
|
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
|
Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. This can be used to alter query logic to bypass security checks, or to insert additional statements that modify the back-end database, possibly including execution of system commands. SQL injection has become a common issue with database-driven web sites. The flaw is easily detected, and easily exploited, and as such, any site or product package with even a minimal user base is likely to be subject to an attempted attack of this kind. This flaw depends on the fact that SQL makes no real distinction between the control and data planes.
|
::NATURE:ChildOf:CWE ID:943:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY NAME:Database Server:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Implementation:NOTE:This weakness typically appears in data-rich applications that save user inputs in a database.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Since SQL databases generally hold sensitive data, loss of confidentiality is a frequent problem with SQL injection vulnerabilities.::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If poor SQL commands are used to check user names and passwords, it may be possible to connect to a system as another user with no previous knowledge of the password.::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If authorization information is held in a SQL database, it may be possible to change this information through the successful exploitation of a SQL injection vulnerability.::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:Just as it may be possible to read sensitive information, it is also possible to make changes or even delete this information with a SQL injection attack.::
|
::METHOD:Automated Static Analysis: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 might not be able to recognize when proper input validation is being performed, leading to false positives - i.e., warnings that do not have any security consequences or do not require any code changes. Automated static analysis might not be able to detect the usage of custom API functions or third-party libraries that indirectly invoke SQL commands, leading to false negatives - especially if the API/library code is not available for analysis.::METHOD:Automated Dynamic Analysis: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.:EFFECTIVENESS:Moderate::METHOD:Manual Analysis: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: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:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Database Scanners Cost effective for partial coverage: Web Application Scanner Web Services Scanner:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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 persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.::PHASE:Architecture and Design:STRATEGY:Parameterization: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. Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using exec or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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. Specifically, follow the principle of least privilege when creating user accounts to a SQL database. The database users should only have the minimum privileges necessary to use their account. If the requirements of the system indicate that a user can read and modify their own data, then limit their privileges so they cannot read/write others' data. Use the strictest permissions possible on all database objects, such as execute-only for stored procedures.::PHASE:Architecture and Design: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:Output Encoding: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 allowlist (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). Instead of building a new implementation, such features may be available in the database or programming language. For example, the Oracle DBMS_ASSERT package can check or enforce that parameters have certain properties that make them less vulnerable to SQL injection. For MySQL, the mysql_real_escape_string() API function is available in both C and PHP.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When constructing SQL query strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping. Note that proper output encoding, escaping, and quoting is the most effective solution for preventing SQL injection, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent SQL injection, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, the name O'Reilly would likely pass the validation step, since it is a common last name in the English language. However, it cannot be directly inserted into the database because it contains the ' apostrophe character, which would need to be escaped or otherwise handled. In this case, stripping the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded. When feasible, it may be safest to disallow meta-characters entirely, instead of escaping them. This will provide some defense in depth. After the data is entered into the database, later processes may neglect to escape meta-characters before use, and you may not have control over those processes.::PHASE:Architecture and Design:STRATEGY:Enforcement by Conversion: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:Implementation:DESCRIPTION:Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not. In the context of SQL Injection, error messages revealing the structure of a SQL query can help attackers tailor successful attack strings.::PHASE:Operation:STRATEGY:Firewall:DESCRIPTION:Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.:EFFECTIVENESS:Moderate::PHASE:Operation Implementation:STRATEGY:Environment Hardening:DESCRIPTION:When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.::
|
::REFERENCE:CVE-2023-32530:DESCRIPTION:SQL injection in security product dashboard using crafted certificate fields:LINK:https://www.cve.org/CVERecord?id=CVE-2023-32530::REFERENCE:CVE-2021-42258:DESCRIPTION:SQL injection in time and billing software, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-42258::REFERENCE:CVE-2021-27101:DESCRIPTION:SQL injection in file-transfer system via a crafted Host header, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-27101::REFERENCE:CVE-2020-12271:DESCRIPTION:SQL injection in firewall product's admin interface or user portal, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-12271::REFERENCE:CVE-2019-3792:DESCRIPTION:An automation system written in Go contains an API that is vulnerable to SQL injection allowing the attacker to read privileged data.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-3792::REFERENCE:CVE-2004-0366:DESCRIPTION:chain: SQL injection in library intended for database authentication allows SQL injection and authentication bypass.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0366::REFERENCE:CVE-2008-2790:DESCRIPTION:SQL injection through an ID that was supposed to be numeric.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2790::REFERENCE:CVE-2008-2223:DESCRIPTION:SQL injection through an ID that was supposed to be numeric.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2223::REFERENCE:CVE-2007-6602:DESCRIPTION:SQL injection via user name.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-6602::REFERENCE:CVE-2008-5817:DESCRIPTION:SQL injection via user name or password fields.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5817::REFERENCE:CVE-2003-0377:DESCRIPTION:SQL injection in security product, using a crafted group name.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0377::REFERENCE:CVE-2008-2380:DESCRIPTION:SQL injection in authentication library.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2380::REFERENCE:CVE-2017-11508:DESCRIPTION:SQL injection in vulnerability management and reporting tool, using a crafted password.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-11508::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:SQL injection::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:SQL Injection::TAXONOMY NAME:CLASP:ENTRY NAME:SQL injection::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A2:ENTRY NAME:Injection Flaws: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:OWASP Top Ten 2004:ENTRY ID:A6:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:WASC:ENTRY ID:19:ENTRY NAME:SQL Injection::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-89::TAXONOMY NAME:SEI CERT Oracle Coding Standard for Java:ENTRY ID:IDS00-J:ENTRY NAME:Prevent SQL injection:MAPPING FIT:Exact::
|
::108::109::110::470::66::7::
|
::TYPE:Relationship:NOTE:SQL injection can be resultant from special character mismanagement, MAID, or denylist/allowlist problems. It can be primary to authentication errors.::
| null | 89
|
Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')
|
Base
|
Draft
|
The product constructs all or part of an LDAP query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended LDAP query when it is sent to a downstream component.
| null |
::NATURE:ChildOf:CWE ID:943:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY NAME:Database Server:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:An attacker could include input that changes the LDAP query which allows unintended commands or code to be executed, allows sensitive data to be read or modified or causes other unintended behavior.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::
|
::REFERENCE:CVE-2021-41232:DESCRIPTION:Chain: authentication routine in Go-based agile development product does not escape user name (CWE-116), allowing LDAP injection (CWE-90):LINK:https://www.cve.org/CVERecord?id=CVE-2021-41232::REFERENCE:CVE-2005-2301:DESCRIPTION:Server does not properly escape LDAP queries, which allows remote attackers to cause a DoS and possibly conduct an LDAP injection attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2301::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:LDAP injection::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A2:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:WASC:ENTRY ID:29:ENTRY NAME:LDAP Injection::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::
|
::136::
|
::TYPE:Relationship:NOTE:Factors: resultant to special character mismanagement, MAID, or denylist/allowlist problems. Can be primary to authentication and verification errors.::
| null | 90
|
XML Injection (aka Blind XPath Injection)
|
Base
|
Draft
|
The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.
|
Within XML, special elements could include reserved words or characters such as <, >, , and &, which could then be used to add new data or modify XML syntax.
|
::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Application Data:IMPACT:Modify Application Data::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::
| null | null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:XML injection (aka Blind Xpath injection)::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A2:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A6:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:WASC:ENTRY ID:23:ENTRY NAME:XML Injection::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::
|
::250::83::
|
::TYPE:Maintenance:NOTE:The description for this entry is generally applicable to XML, but the name includes blind XPath injection which is more closely associated with CWE-643. Therefore this entry might need to be deprecated or converted to a general category - although injection into raw XML is not covered by CWE-643 or CWE-652.::TYPE:Theoretical:NOTE:In vulnerability theory terms, this is a representation-specific case of a Data/Directive Boundary Error.::TYPE:Research Gap:NOTE:Under-reported. This is likely found regularly by third party code auditors, but there are very few publicly reported examples.::
| null | 91
|
Improper Neutralization of CRLF Sequences ('CRLF Injection')
|
Base
|
Draft
|
The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.
| null |
::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:117:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Integrity:IMPACT:Modify Application Data::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:DESCRIPTION:Avoid using CRLF as a special sequence.::PHASE:Implementation:DESCRIPTION:Appropriately filter or quote CRLF sequences in user-controlled input.::
|
::REFERENCE:CVE-2002-1771:DESCRIPTION:CRLF injection enables spam proxy (add mail headers) using email address or name.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1771::REFERENCE:CVE-2002-1783:DESCRIPTION:CRLF injection in API function arguments modify headers for outgoing requests.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1783::REFERENCE:CVE-2004-1513:DESCRIPTION:Spoofed entries in web server log file via carriage returns:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1513::REFERENCE:CVE-2006-4624:DESCRIPTION:Chain: inject fake log entries with fake timestamps using CRLF injection:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4624::REFERENCE:CVE-2005-1951:DESCRIPTION:Chain: Application accepts CRLF in an object ID, allowing HTTP response splitting.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1951::REFERENCE:CVE-2004-1687:DESCRIPTION:Chain: HTTP response splitting via CRLF in parameter related to URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1687::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:CRLF Injection::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A2:ENTRY NAME:Injection Flaws:MAPPING FIT:CWE More Specific::TAXONOMY NAME:WASC:ENTRY ID:24:ENTRY NAME:HTTP Request Splitting::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::
|
::15::81::
| null | null | 93
|
Improper Control of Generation of Code ('Code Injection')
|
Base
|
Draft
|
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
When a product allows a user's input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the product. Such an alteration could lead to arbitrary code execution. Injection problems encompass a wide variety of issues -- all mitigated in very different ways. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.
|
::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:913:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Interpreted:LANGUAGE PREVALENCE:Sometimes::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:In some cases, injectable code controls authentication; this may lead to a remote vulnerability.::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Injected code can access resources that the attacker is directly prevented from accessing.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:Code injection attacks can lead to loss of data integrity in nearly all cases as the control-plane data injected is always incidental to data recall or writing. Additionally, code injection can often result in the execution of arbitrary code.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:Often the actions performed by injected control code are unlogged.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Refactor your program so that you do not have to dynamically generate code.::PHASE:Architecture and Design:DESCRIPTION:Run your code in a jail or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().::PHASE:Testing:DESCRIPTION:Use automated static analysis tools that target this type of weakness. Many modern techniques use data flow analysis to minimize the number of false positives. This is not a perfect solution, since 100% accuracy and coverage are not feasible.::PHASE:Testing:DESCRIPTION:Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.::PHASE:Operation:STRATEGY:Compilation or Build Hardening:DESCRIPTION:Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's -T switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).::PHASE:Operation:STRATEGY:Environment Hardening:DESCRIPTION:Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's -T switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).::PHASE:Implementation:DESCRIPTION:For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].:EFFECTIVENESS:Discouraged Common Practice::
|
::REFERENCE:CVE-2022-2054:DESCRIPTION:Python compiler uses eval() to execute malicious strings as Python code.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-2054::REFERENCE:CVE-2021-22204:DESCRIPTION:Chain: regex in EXIF processor code does not correctly determine where a string ends (CWE-625), enabling eval injection (CWE-95), as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-22204::REFERENCE:CVE-2020-8218:DESCRIPTION:Code injection in VPN product, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-8218::REFERENCE:CVE-2008-5071:DESCRIPTION:Eval injection in PHP program.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5071::REFERENCE:CVE-2002-1750:DESCRIPTION:Eval injection in Perl program.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1750::REFERENCE:CVE-2008-5305:DESCRIPTION:Eval injection in Perl program using an ID that should only contain hyphens and numbers.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5305::REFERENCE:CVE-2002-1752:DESCRIPTION:Direct code injection into Perl eval function.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1752::REFERENCE:CVE-2002-1753:DESCRIPTION:Eval injection in Perl program.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1753::REFERENCE:CVE-2005-1527:DESCRIPTION:Direct code injection into Perl eval function.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1527::REFERENCE:CVE-2005-2837:DESCRIPTION:Direct code injection into Perl eval function.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2837::REFERENCE:CVE-2005-1921:DESCRIPTION:MFV. code injection into PHP eval statement using nested constructs that should not be nested.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1921::REFERENCE:CVE-2005-2498:DESCRIPTION:MFV. code injection into PHP eval statement using nested constructs that should not be nested.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2498::REFERENCE:CVE-2005-3302:DESCRIPTION:Code injection into Python eval statement from a field in a formatted file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3302::REFERENCE:CVE-2007-1253:DESCRIPTION:Eval injection in Python program.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-1253::REFERENCE:CVE-2001-1471:DESCRIPTION:chain: Resultant eval injection. An invalid value prevents initialization of variables, which can be modified by attacker and later injected into PHP eval statement.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1471::REFERENCE:CVE-2002-0495:DESCRIPTION:Perl code directly injected into CGI library file from parameters to another CGI program.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0495::REFERENCE:CVE-2005-1876:DESCRIPTION:Direct PHP code injection into supporting template file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1876::REFERENCE:CVE-2005-1894:DESCRIPTION:Direct code injection into PHP script that can be accessed by attacker.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1894::REFERENCE:CVE-2003-0395:DESCRIPTION:PHP code from User-Agent HTTP header directly inserted into log file implemented as PHP script.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0395::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY ID:CODE:ENTRY NAME:Code Evaluation and Injection::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 3.5::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 3.5::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SVV-1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SVV-3::
|
::242::35::77::
| null | null | 94
|
Missing XML Validation
|
Base
|
Draft
|
The product 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:1286:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Input Validation: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.::
| null | null | null |
::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::
| null | null | 112
|
Misinterpretation of Input
|
Base
|
Incomplete
|
The product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion.
| null |
::NATURE:ChildOf:CWE ID:436:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
|
::METHOD:Fuzzing:DESCRIPTION:Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.:EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-2005-2225:DESCRIPTION:Product sees dangerous file extension in free text of a group discussion, disconnects all users.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2225::REFERENCE:CVE-2001-0003:DESCRIPTION:Product does not correctly import and process security settings from another product.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0003::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Misinterpretation Error::
| null |
::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).::
| null | 115
|
Improper Output Neutralization for Logs
|
Base
|
Draft
|
The product 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:20:VIEW ID:700:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific: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.::
| null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Non-Repudiation:IMPACT:Modify Application Data:IMPACT:Hide Activities:IMPACT:Execute Unauthorized Code or Commands:NOTE: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.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists 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: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: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 allowlist 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://www.cve.org/CVERecord?id=CVE-2006-4624::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Log Forging::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:IDS03-J:ENTRY NAME:Do not log unsanitized user input:MAPPING FIT:Exact::TAXONOMY NAME:SEI CERT Oracle Coding Standard for Java:ENTRY ID:IDS03-J:ENTRY NAME:Do not log unsanitized user input:MAPPING FIT:Exact::
|
::268::81::93::
| null | null | 117
|
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
|
Base
|
Incomplete
|
The product 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 product attempts to put more data in a buffer than it can hold, or when it 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 product 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:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1340:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:123:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::
|
::ORDINALITY:Resultant::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::LANGUAGE CLASS:Assembly:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Classic Buffer Overflow:DESCRIPTION:This term was frequently used by vulnerability researchers during approximately 1995 to 2005 to differentiate buffer copies without length checks (which had been known about for decades) from other emerging weaknesses that still involved invalid accesses of buffers, as vulnerability researchers began to develop advanced exploitation techniques.::TERM:Unbounded Transfer::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of the product's implicit security policy. This can often be used to subvert any other security service.::SCOPE:Availability:IMPACT:Modify Memory:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):NOTE:Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the product into an infinite loop.::
|
::METHOD:Automated Static Analysis: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.:EFFECTIVENESS:High::METHOD:Automated Dynamic Analysis: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: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: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:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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):EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Requirements:STRATEGY:Language Selection: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: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:Operation Build and Compilation:STRATEGY:Environment Hardening:DESCRIPTION:Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.:EFFECTIVENESS:Defense in Depth::PHASE:Implementation: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 there is no 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:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Architecture and Design: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 Build and Compilation:STRATEGY:Environment Hardening: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]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as rebasing (for Windows) and prelinking (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].:EFFECTIVENESS:Defense in Depth::PHASE:Operation:STRATEGY:Environment Hardening:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].:EFFECTIVENESS:Defense in Depth::PHASE:Build and Compilation Operation: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:DESCRIPTION:Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design:STRATEGY:Enforcement by Conversion: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: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: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.:EFFECTIVENESS:Limited::
|
::REFERENCE:CVE-2000-1094:DESCRIPTION:buffer overflow using command with long argument:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1094::REFERENCE:CVE-1999-0046:DESCRIPTION:buffer overflow in local program using long environment variable:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0046::REFERENCE:CVE-2002-1337:DESCRIPTION:buffer overflow in comment characters, when product increments a counter for a > but does not decrement for <:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1337::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2003-0595::REFERENCE: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://www.cve.org/CVERecord?id=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::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-120::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-CWE-120::
|
::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.::
| null | 120
|
Buffer Underwrite ('Buffer Underflow')
|
Base
|
Incomplete
|
The product 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:787:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::
| null |
::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:Implementation::
| null | null |
::SCOPE:Integrity:SCOPE:Availability:IMPACT:Modify Memory:IMPACT:DoS: Crash, Exit, or Restart:NOTE: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:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Modify Memory:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE: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:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:When the consequence is arbitrary code execution, this can often be used to subvert any other security service.::
| null |
::PHASE:Requirements:DESCRIPTION:Choose a language that is not susceptible to these issues.::PHASE:Implementation:DESCRIPTION:All calculated values that are used as index or for pointer arithmetic should be validated to ensure that they are within an expected range.::
|
::REFERENCE:CVE-2021-24018:DESCRIPTION:buffer underwrite in firmware verification routine allows code execution via a crafted firmware image:LINK:https://www.cve.org/CVERecord?id=CVE-2021-24018::REFERENCE:CVE-2002-2227:DESCRIPTION:Unchecked length of SSLv2 challenge value leads to buffer underflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2227::REFERENCE:CVE-2007-4580:DESCRIPTION:Buffer underflow from a small size value with a large buffer (length parameter inconsistency, CWE-130):LINK:https://www.cve.org/CVERecord?id=CVE-2007-4580::REFERENCE: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:https://www.cve.org/CVERecord?id=CVE-2007-1584::REFERENCE:CVE-2007-0886:DESCRIPTION:Buffer underflow resultant from encoded data that triggers an integer overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-0886::REFERENCE:CVE-2006-6171:DESCRIPTION:Product sets an incorrect buffer size limit, leading to off-by-two buffer underflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-6171::REFERENCE:CVE-2006-4024:DESCRIPTION:Negative value is used in a memcpy() operation, leading to buffer underflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4024::REFERENCE:CVE-2004-2620:DESCRIPTION:Buffer underflow due to mishandled special characters:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2620::
| null | null |
::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::
| null |
::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).::
| null | 124
|
Out-of-bounds Read
|
Base
|
Draft
|
The product 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, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The product 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:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1340:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Often::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Memory::SCOPE:Confidentiality:IMPACT:Bypass Protection Mechanism:NOTE:By reading out-of-bounds memory, an attacker might be able to get secret values, such as memory addresses, which can be bypass protection mechanisms such as ASLR in order to improve the reliability and likelihood of exploiting a separate weakness to achieve code execution instead of just denial of service.::
|
::METHOD:Fuzzing:DESCRIPTION:Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.:EFFECTIVENESS:High::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.::PHASE:Architecture and Design:STRATEGY:Language Selection:DESCRIPTION:Use a language that provides appropriate memory abstractions.::
|
::REFERENCE:CVE-2020-11899:DESCRIPTION:Out-of-bounds read in IP stack used in embedded systems, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-11899::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://www.cve.org/CVERecord?id=CVE-2014-0160::REFERENCE:CVE-2021-40985:DESCRIPTION:HTML conversion package has a buffer under-read, allowing a crash:LINK:https://www.cve.org/CVERecord?id=CVE-2021-40985::REFERENCE:CVE-2018-10887:DESCRIPTION:Chain: unexpected sign extension (CWE-194) leads to integer overflow (CWE-190), causing an out-of-bounds read (CWE-125):LINK:https://www.cve.org/CVERecord?id=CVE-2018-10887::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://www.cve.org/CVERecord?id=CVE-2009-2523::REFERENCE:CVE-2018-16069:DESCRIPTION:Chain: series of floating-point precision errors (CWE-1339) in a web browser rendering engine causes out-of-bounds read (CWE-125), giving access to cross-origin data:LINK:https://www.cve.org/CVERecord?id=CVE-2018-16069::REFERENCE:CVE-2004-0112:DESCRIPTION:out-of-bounds read due to improper length check:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0112::REFERENCE:CVE-2004-0183:DESCRIPTION:packet with large number of specified elements cause out-of-bounds read.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0183::REFERENCE:CVE-2004-0221:DESCRIPTION:packet with large number of specified elements cause out-of-bounds read.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0221::REFERENCE:CVE-2004-0184:DESCRIPTION:out-of-bounds read, resultant from integer underflow:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0184::REFERENCE:CVE-2004-1940:DESCRIPTION:large length value causes out-of-bounds read:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1940::REFERENCE:CVE-2004-0421:DESCRIPTION:malformed image causes out-of-bounds read:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0421::REFERENCE:CVE-2008-4113:DESCRIPTION:OS kernel trusts userland-supplied length value, allowing reading of sensitive information:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4113::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Out-of-bounds Read::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::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP8:ENTRY NAME:Faulty Buffer Access::
|
::540::
| null | null | 125
|
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.
| null |
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::NATURE:PeerOf:CWE ID:190:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::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.::
| null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Instability:NOTE: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:IMPACT:Modify Memory:NOTE: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:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Bypass Protection Mechanism:NOTE: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.::
| null |
::PHASE::DESCRIPTION:Requirements specification: The choice could be made to use a language that is not susceptible to these issues.::PHASE:Architecture and Design:DESCRIPTION:Provide clear upper and lower bounds on the scale of any protocols designed.::PHASE:Implementation:DESCRIPTION:Perform validation on all incremented variables to ensure that they remain within reasonable bounds.::
| null | null | null |
::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.::
| null | 128
|
Improper Handling of Length Parameter Inconsistency
|
Base
|
Incomplete
|
The product 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:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:119:VIEW ID:1340:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:805:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Sometimes::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Sometimes::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:length manipulation::TERM:length tampering::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Memory:IMPACT:Modify Memory:IMPACT:Varies by Context::
| null |
::PHASE:Implementation: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:DESCRIPTION:Do not let the user control the size of the buffer.::PHASE:Implementation: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://www.cve.org/CVERecord?id=CVE-2014-0160::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2009-2299::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2001-0825::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2001-1186::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2001-0191::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2003-0429::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2000-0655::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0492::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0201::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2003-0825::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0095::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0826::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0808::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2002-1357::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0774::REFERENCE:CVE-2004-0989:DESCRIPTION:Multiple buffer overflows in xml library that may allow remote attackers to execute arbitrary code via long URLs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0989::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0568::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2003-0327::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2003-0345::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0430::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2005-0064::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0413::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2004-0940::REFERENCE:CVE-2002-1235:DESCRIPTION:Length field of a request not verified.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1235::REFERENCE:CVE-2005-3184:DESCRIPTION:Buffer overflow by modifying a length value.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3184::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Length Parameter Inconsistency::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted Input to Command::
|
::47::
|
::TYPE:Relationship:NOTE:This probably overlaps other categories including zero-length issues.::
| null | 130
|
Incorrect Calculation of Buffer Size
|
Base
|
Draft
|
The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
| null |
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1340:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::
| null |
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:SCOPE:Availability:SCOPE:Confidentiality:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Memory:IMPACT:Modify Memory:NOTE: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: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.:EFFECTIVENESS:High::METHOD:Automated Dynamic Analysis: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.:EFFECTIVENESS:Moderate::METHOD:Manual Analysis: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: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.:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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):EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Implementation: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: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: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: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: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: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:DESCRIPTION:Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.:EFFECTIVENESS:Moderate::PHASE:Implementation:DESCRIPTION:Use sizeof() on the appropriate data type to avoid CWE-467.::PHASE:Implementation: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 validation and will reduce surprises related to unexpected casting.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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:Operation Build and Compilation:STRATEGY:Environment Hardening:DESCRIPTION:Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.:EFFECTIVENESS:Defense in Depth::PHASE:Operation Build and Compilation:STRATEGY:Environment Hardening: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]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as rebasing (for Windows) and prelinking (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].:EFFECTIVENESS:Defense in Depth::PHASE:Operation:STRATEGY:Environment Hardening:DESCRIPTION:Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].:EFFECTIVENESS:Defense in Depth::PHASE:Implementation:STRATEGY:Compilation or Build Hardening: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: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: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.:EFFECTIVENESS:Limited::
|
::REFERENCE:CVE-2020-17087:DESCRIPTION:Chain: integer truncation (CWE-197) causes small buffer allocation (CWE-131) leading to out-of-bounds write (CWE-787) in kernel pool, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-17087::REFERENCE:CVE-2004-1363:DESCRIPTION:substitution overflow: buffer overflow using environment variables that are expanded after the length check is performed:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1363::REFERENCE:CVE-2004-0747:DESCRIPTION:substitution overflow: buffer overflow using expansion of environment variables:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0747::REFERENCE:CVE-2005-2103:DESCRIPTION:substitution overflow: buffer overflow using a large number of substitution strings:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2103::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2005-3120::REFERENCE:CVE-2003-0899:DESCRIPTION:transformation overflow: buffer overflow when expanding > to >, etc.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0899::REFERENCE:CVE-2001-0334:DESCRIPTION:expansion overflow: buffer overflow using wildcards:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0334::REFERENCE:CVE-2001-0248:DESCRIPTION:expansion overflow: long pathname + glob = overflow:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0248::REFERENCE:CVE-2001-0249:DESCRIPTION:expansion overflow: long pathname + glob = overflow:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0249::REFERENCE:CVE-2002-0184:DESCRIPTION:special characters in argument are not properly expanded:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0184::REFERENCE:CVE-2004-0434:DESCRIPTION:small length value leads to heap overflow:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0434::REFERENCE:CVE-2002-1347:DESCRIPTION:multiple variants:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1347::REFERENCE:CVE-2005-0490:DESCRIPTION:needs closer investigation, but probably expansion-based:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0490::REFERENCE:CVE-2004-0940:DESCRIPTION:needs closer investigation, but probably expansion-based:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0940::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2008-0599::
| null | null |
::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.::
| null | 131
|
Use of Externally-Controlled Format String
|
Base
|
Draft
|
The product 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:668:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:668:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:123:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:Perl:LANGUAGE PREVALENCE:Rarely::
| null | null |
::PHASE:Implementation:NOTE:The programmer rarely intends for a format string to be externally-controlled at all. This weakness is frequently introduced in code that constructs log messages, where a constant format string is omitted.::PHASE:Implementation:NOTE:In cases such as localization and internationalization, the language-specific message repositories could be an avenue for exploitation, but the format string issue would be resultant, since attacker control of those repositories would also allow modification of message length, format, and content.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:Format string problems allow for information disclosure which can severely simplify exploitation of the program.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:Format string problems can result in the execution of arbitrary code.::
|
::METHOD:Automated Static Analysis: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: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.:EFFECTIVENESS:Limited::METHOD:Automated Static Analysis - Binary or Bytecode: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.:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Requirements:DESCRIPTION:Choose a language that is not subject to this flaw.::PHASE:Implementation: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:DESCRIPTION:Run compilers and linkers with high warning levels, since they may detect incorrect usage.::
|
::REFERENCE:CVE-2002-1825:DESCRIPTION:format string in Perl program:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1825::REFERENCE:CVE-2001-0717:DESCRIPTION:format string in bad call to syslog function:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0717::REFERENCE:CVE-2002-0573:DESCRIPTION:format string in bad call to syslog function:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0573::REFERENCE:CVE-2002-1788:DESCRIPTION:format strings in NNTP server responses:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1788::REFERENCE: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://www.cve.org/CVERecord?id=CVE-2006-2480::REFERENCE:CVE-2007-2027:DESCRIPTION:Chain: untrusted search path enabling resultant format string by loading malicious internationalization messages:LINK:https://www.cve.org/CVERecord?id=CVE-2007-2027::
|
::Logging::Error Handling::String 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:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:IDS06-J:ENTRY NAME:Exclude user input from format strings::TAXONOMY NAME:SEI CERT Perl Coding Standard: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::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-134::
|
::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.::
| null | 134
|
Incorrect Calculation of Multi-Byte String Length
|
Base
|
Draft
|
The product does not correctly calculate the length of strings that can contain wide or multi-byte characters.
| null |
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:There are several ways in which improper string length checking may result in an exploitable condition. All of these, however, involve the introduction of buffer overflow conditions in order to reach an exploitable state. The first of these issues takes place when the output of a wide or multi-byte character string, string-length function is used as a size for the allocation of memory. While this will result in an output of the number of characters in the string, note that the characters are most likely not a single byte, as they are with standard character strings. So, using the size returned as the size sent to new or malloc and copying the string to this newly allocated memory will result in a buffer overflow. Another common way these strings are misused involves the mixing of standard string and wide or multi-byte string functions on a single string. Invariably, this mismatched information will result in the creation of a possibly exploitable buffer overflow condition.::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE: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:IMPACT:Read Memory:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):NOTE: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:IMPACT:Read Memory:NOTE: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:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Always verify the length of the string unit character.::PHASE:Implementation:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use length computing functions (e.g. strlen, wcslen, etc.) appropriately with their equivalent type (e.g.: byte, wchar_t, etc.)::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Improper string length checking::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):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::
| null | null | null | 135
|
Improper Neutralization of Delimiters
|
Base
|
Draft
|
The product does not neutralize or incorrectly neutralizes delimiters.
| null |
::NATURE:ChildOf:CWE ID:138:VIEW ID:1000:ORDINAL:Primary::
| null | null | null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
| null |
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Developers should anticipate that delimiters will be injected/removed/manipulated in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists 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: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 allowlist (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: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 allowlist 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://www.cve.org/CVERecord?id=CVE-2003-0307::REFERENCE:CVE-2000-0293:DESCRIPTION:Multiple internal space, insufficient quoting - program does not use proper delimiter between values.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0293::REFERENCE:CVE-2001-0527:DESCRIPTION:Attacker inserts carriage returns and | field separator characters to add new user/privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0527::REFERENCE:CVE-2002-0267:DESCRIPTION:Linebreak in field of PHP script allows admin privileges when written to data file.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0267::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Delimiter Problems::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP24:ENTRY NAME:Tainted input to command::
|
::15::
| null | null | 140
|
Improper Handling of Missing Special Element
|
Base
|
Draft
|
The product receives input from an upstream component, but it does not handle or incorrectly handles when an expected special element is missing.
| null |
::NATURE:ChildOf:CWE ID:159:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:228:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart::
| null |
::PHASE::DESCRIPTION:Developers should anticipate that special elements will be removed in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2002-1362:DESCRIPTION:Crash via message type without separator character:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1362::REFERENCE:CVE-2002-0729:DESCRIPTION:Missing special character (separator) causes crash:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0729::REFERENCE:CVE-2002-1532:DESCRIPTION:HTTP GET without rnrn CRLF sequences causes product to wait indefinitely and prevents other users from accessing it:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1532::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Missing Special Element::
| null | null | null | 166
|
Improper Handling of Additional Special Element
|
Base
|
Draft
|
The product receives input from an upstream component, but it does not handle or incorrectly handles when an additional unexpected special element is provided.
| null |
::NATURE:ChildOf:CWE ID:159:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:228:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
| null |
::PHASE::DESCRIPTION:Developers should anticipate that extra special elements will be injected in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists 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: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 allowlist (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: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2000-0116:DESCRIPTION:Extra < in front of SCRIPT tag bypasses XSS prevention.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0116::REFERENCE:CVE-2001-1157:DESCRIPTION:Extra < in front of SCRIPT tag.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1157::REFERENCE:CVE-2002-2086:DESCRIPTION:<script - probably a cleansing error:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2086::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Extra Special Element::
| null | null | null | 167
|
Improper Handling of Inconsistent Special Elements
|
Base
|
Draft
|
The product does not properly handle input in which an inconsistency exists between two or more special characters or reserved words.
|
An example of this problem would be if paired characters appear in the wrong order, or if the special characters are not properly nested.
|
::NATURE:ChildOf:CWE ID:159:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:228:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:SCOPE:Access Control:SCOPE:Non-Repudiation:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Bypass Protection Mechanism:IMPACT:Hide Activities::
| null |
::PHASE::DESCRIPTION:Developers should anticipate that inconsistent special elements will be injected/manipulated in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
| null | null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Inconsistent Special Elements::
| null | null | null | 168
|
Improper Null Termination
|
Base
|
Incomplete
|
The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
|
Null termination errors frequently occur in two different ways. An off-by-one error could cause a null to be written out of bounds, leading to an overflow. Or, a program could use a strncpy() function call incorrectly, which prevents a null terminator from being added at all. Other scenarios are possible.
|
::NATURE:ChildOf:CWE ID:707:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:120:VIEW ID:1000::NATURE:CanPrecede:CWE ID:126:VIEW ID:1000::NATURE:CanAlsoBe:CWE ID:147:VIEW ID:1000::NATURE:PeerOf:CWE ID:464:VIEW ID:1000::NATURE:PeerOf:CWE ID:463:VIEW ID:1000::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::
|
::ORDINALITY:Resultant::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Read Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:The case of an omitted null character is the most dangerous of the possible issues. This will almost certainly result in information disclosure, and possibly a buffer overflow condition, which may be exploited to execute arbitrary code.::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Read Memory:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):NOTE:If a null character is omitted from a string, then most string-copying functions will read data until they locate a null character, even outside of the intended boundaries of the string. This could: cause a crash due to a segmentation fault cause sensitive adjacent memory to be copied and sent to an outsider trigger a buffer overflow when the copy is being written to a fixed-size buffer.::SCOPE:Integrity:SCOPE:Availability:IMPACT:Modify Memory:IMPACT:DoS: Crash, Exit, or Restart:NOTE:Misplaced null characters may result in any number of security problems. The biggest issue is a subset of buffer overflow, and write-what-where conditions, where data corruption occurs from the writing of a null character over valid data, or even instructions. A randomly placed null character may put the system into an undefined state, and therefore make it prone to crashing. A misplaced null character may corrupt other data in memory.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Execute Unauthorized Code or Commands:NOTE:Should the null character corrupt the process flow, or affect a flag controlling access, it may lead to logical errors which allow for the execution of arbitrary code.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Requirements:DESCRIPTION:Use a language that is not susceptible to these issues. However, be careful of null byte interaction errors (CWE-626) with lower-level constructs that may be written in a language that is susceptible.::PHASE:Implementation:DESCRIPTION:Ensure that all string functions used are understood fully as to how they append null characters. Also, be wary of off-by-one errors when appending nulls to the end of strings.::PHASE:Implementation:DESCRIPTION:If performance constraints permit, special code can be added that validates null-termination of string buffers, this is a rather naive and error-prone solution.::PHASE:Implementation:DESCRIPTION:Switch to bounded string manipulation functions. Inspect buffer lengths involved in the buffer overrun trace reported with the defect.::PHASE:Implementation:DESCRIPTION:Add code that fills buffers with nulls (however, the length of buffers still needs to be inspected, to ensure that the non null-terminated string is not written at the physical end of the buffer).::
|
::REFERENCE:CVE-2000-0312:DESCRIPTION:Attacker does not null-terminate argv[] when invoking another program.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0312::REFERENCE:CVE-2003-0777:DESCRIPTION:Interrupted step causes resultant lack of null termination.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0777::REFERENCE:CVE-2004-1072:DESCRIPTION:Fault causes resultant lack of null termination, leading to buffer expansion.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1072::REFERENCE:CVE-2001-1389:DESCRIPTION:Multiple vulnerabilities related to improper null termination.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1389::REFERENCE:CVE-2003-0143:DESCRIPTION:Product does not null terminate a message buffer after snprintf-like call, leading to overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0143::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://www.cve.org/CVERecord?id=CVE-2009-2523::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Improper Null Termination::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:String Termination Error::TAXONOMY NAME:CLASP:ENTRY NAME:Miscalculated null termination::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A9:ENTRY NAME:Denial of Service:MAPPING FIT:CWE More Specific::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS30-C:ENTRY NAME:Use the readlink() function properly:MAPPING FIT:CWE More Abstract::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:STR03-C:ENTRY NAME:Do not inadvertently truncate a null-terminated byte string::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:Exact::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP11:ENTRY NAME:Improper Null Termination::
| null |
::TYPE:Relationship:NOTE:Factors: this is usually resultant from other weaknesses such as off-by-one errors, but it can be primary to boundary condition violations such as buffer overflows. In buffer overflows, it can act as an expander for assumed-immutable data.::TYPE:Relationship:NOTE:Overlaps missing input terminator.::TYPE:Applicable Platform:NOTE:Conceptually, this does not just apply to the C language; any language or representation that involves a terminator could have this type of problem.::TYPE:Maintenance:NOTE:As currently described, this entry is more like a category than a weakness.::
| null | 170
|
Improper Handling of Case Sensitivity
|
Base
|
Incomplete
|
The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.
|
Improperly handled case sensitive data can lead to several possible consequences, including: case-insensitive passwords reducing the size of the key space, making brute force attacks easier bypassing filters or access controls using alternate names multiple interpretation errors using alternate names.
|
::NATURE:ChildOf:CWE ID:706:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:706:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:433:VIEW ID:1000::NATURE:CanPrecede:CWE ID:289:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
| null |
::PHASE:Architecture and Design:STRATEGY:Input Validation:DESCRIPTION:Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2000-0499:DESCRIPTION:Application server allows attackers to bypass execution of a jsp page and read the source code using an upper case JSP extension in the request.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0499::REFERENCE:CVE-2000-0497:DESCRIPTION:The server is case sensitive, so filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype text.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0497::REFERENCE:CVE-2000-0498:DESCRIPTION:The server is case sensitive, so filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype text.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0498::REFERENCE:CVE-2001-0766:DESCRIPTION:A URL that contains some characters whose case is not matched by the server's filters may bypass access restrictions because the case-insensitive file system will then handle the request after it bypasses the case sensitive filter.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0766::REFERENCE:CVE-2001-0795:DESCRIPTION:Server allows remote attackers to obtain source code of CGI scripts via URLs that contain MS-DOS conventions such as (1) upper case letters or (2) 8.3 file names.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0795::REFERENCE:CVE-2001-1238:DESCRIPTION:Task Manager does not allow local users to end processes with uppercase letters named (1) winlogon.exe, (2) csrss.exe, (3) smss.exe and (4) services.exe via the Process tab which could allow local users to install Trojan horses that cannot be stopped.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1238::REFERENCE:CVE-2003-0411:DESCRIPTION:chain: Code was ported from a case-sensitive Unix platform to a case-insensitive Windows platform where filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype text.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0411::REFERENCE:CVE-2002-0485:DESCRIPTION:Leads to interpretation error:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0485::REFERENCE:CVE-1999-0239:DESCRIPTION:Directories may be listed because lower case web requests are not properly handled by the server.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0239::REFERENCE:CVE-2005-0269:DESCRIPTION:File extension check in forum software only verifies extensions that contain all lowercase letters, which allows remote attackers to upload arbitrary files via file extensions that include uppercase letters.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0269::REFERENCE:CVE-2004-1083:DESCRIPTION:Web server restricts access to files in a case sensitive manner, but the filesystem accesses files in a case insensitive manner, which allows remote attackers to read privileged files using alternate capitalization.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1083::REFERENCE:CVE-2002-2119:DESCRIPTION:Case insensitive passwords lead to search space reduction.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2119::REFERENCE:CVE-2004-2214:DESCRIPTION:HTTP server allows bypass of access restrictions using URIs with mixed case.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2214::REFERENCE:CVE-2004-2154:DESCRIPTION:Mixed upper/lowercase allows bypass of ACLs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2154::REFERENCE:CVE-2005-4509:DESCRIPTION:Bypass malicious script detection by using tokens that aren't case sensitive.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-4509::REFERENCE:CVE-2002-1820:DESCRIPTION:Mixed case problem allows admin to have Admin rights (alternate name property).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1820::REFERENCE:CVE-2007-3365:DESCRIPTION:Chain: uppercase file extensions causes web server to return script source code instead of executing the script.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3365::REFERENCE:CVE-2021-39155:DESCRIPTION:Chain: A microservice integration and management platform compares the hostname in the HTTP Host header in a case-sensitive way (CWE-178, CWE-1289), allowing bypass of the authorization policy (CWE-863) using a hostname with mixed case or other variations.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-39155::
|
::File Processing::
|
::File or Directory::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Case Sensitivity (lowercase, uppercase, mixed case)::
| null |
::TYPE:Research Gap:NOTE:These are probably under-studied in Windows and Mac environments, where file names are case-insensitive and thus are subject to equivalence manipulations involving case.::
| null | 178
|
Incorrect Behavior Order: Early Validation
|
Base
|
Incomplete
|
The product validates input before applying protection mechanisms that modify the input, which could allow an attacker to bypass the validation via dangerous inputs that only arise after the modification.
|
Product needs to validate data at the proper time, after data has been canonicalized and cleansed. Early validation is susceptible to various manipulations that result in dangerous inputs that are produced by canonicalization and cleansing.
|
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000::NATURE:ChildOf:CWE ID:696:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:Since early validation errors usually arise from improperly implemented defensive mechanisms, it is likely that these will be introduced more frequently as secure programming becomes implemented more widely.::
| null | null |
::SCOPE:Access Control:SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could include dangerous input that bypasses validation protection mechanisms which can be used to launch various attacks including injection attacks, execute arbitrary code or cause other unintended behavior.::
| null |
::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2002-0433:DESCRIPTION:Product allows remote attackers to view restricted files via an HTTP request containing a * (wildcard or asterisk) character.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0433::REFERENCE:CVE-2003-0332:DESCRIPTION:Product modifies the first two letters of a filename extension after performing a security check, which allows remote attackers to bypass authentication via a filename with a .ats extension instead of a .hts extension.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0332::REFERENCE:CVE-2002-0802:DESCRIPTION:Database consumes an extra character when processing a character that cannot be converted, which could remove an escape character from the query and make the application subject to SQL injection attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0802::REFERENCE:CVE-2000-0191:DESCRIPTION:Overlaps fakechild/../realchild:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0191::REFERENCE:CVE-2004-2363:DESCRIPTION:Product checks URI for < and other literal characters, but does it before hex decoding the URI, so %3E and other sequences are allowed.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2363::REFERENCE:CVE-2002-0934:DESCRIPTION:Directory traversal vulnerability allows remote attackers to read or modify arbitrary files via invalid characters between two . (dot) characters, which are filtered and result in a .. sequence.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0934::REFERENCE:CVE-2003-0282:DESCRIPTION:Directory traversal vulnerability allows attackers to overwrite arbitrary files via invalid characters between two . (dot) characters, which are filtered and result in a .. sequence.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0282::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Early Validation Errors::
|
::3::43::71::
|
::TYPE:Research Gap:NOTE:These errors are mostly reported in path traversal vulnerabilities, but the concept applies whenever validation occurs.::
| null | 179
|
Collapse of Data into Unsafe Value
|
Base
|
Draft
|
The product filters data in a way that causes it to be reduced or collapsed into an unsafe value that violates an expected security property.
| null |
::NATURE:ChildOf:CWE ID:693:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:33:VIEW ID:1000::NATURE:CanPrecede:CWE ID:34:VIEW ID:1000::NATURE:CanPrecede:CWE ID:35:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Input Validation:DESCRIPTION:Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::PHASE::DESCRIPTION:Canonicalize the name to match that of the file system's representation of the name. This can sometimes be achieved with an available API (e.g. in Win32 the GetFullPathName function).::
|
::REFERENCE:CVE-2004-0815:DESCRIPTION:/.//// in pathname collapses to absolute path.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0815::REFERENCE:CVE-2005-3123:DESCRIPTION:/.//..//////././ is collapsed into /.././ after .. and // sequences are removed.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3123::REFERENCE:CVE-2002-0325:DESCRIPTION:.../...// collapsed to ... due to removal of ./ in web server.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0325::REFERENCE:CVE-2002-0784:DESCRIPTION:chain: HTTP server protects against .. but allows . variants such as ////./../.../. If the server removes /.. sequences, the result would collapse into an unsafe value ////../ (CWE-182).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0784::REFERENCE:CVE-2005-2169:DESCRIPTION:MFV. Regular expression intended to protect against directory traversal reduces .../...// to ../.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2169::REFERENCE:CVE-2001-1157:DESCRIPTION:XSS protection mechanism strips a <script> sequence that is nested in another <script> sequence.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1157::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Collapse of Data into Unsafe Value::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:IDS11-J:ENTRY NAME:Eliminate noncharacter code points before validation::
| null |
::TYPE:Relationship:NOTE:Overlaps regular expressions, although an implementation might not necessarily use regexp's.::
| null | 182
|
Permissive List of Allowed Inputs
|
Base
|
Draft
|
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.
| null |
::NATURE:ChildOf:CWE ID:697:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:434:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Allowlist / Allow List:DESCRIPTION:This is used by CWE and CAPEC instead of other commonly-used terms. Its counterpart is denylist.::TERM:Safelist / Safe List:DESCRIPTION:This is often used by security tools such as firewalls, email or web gateways, proxies, etc.::TERM:Whitelist / White List:DESCRIPTION:This term is frequently used, but usage has been declining as organizations have started to adopt other terms.::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-2019-12799:DESCRIPTION:chain: bypass of untrusted deserialization issue (CWE-502) by using an assumed-trusted class (CWE-183):LINK:https://www.cve.org/CVERecord?id=CVE-2019-12799::REFERENCE:CVE-2019-10458:DESCRIPTION:sandbox bypass using a method that is on an allowlist:LINK:https://www.cve.org/CVERecord?id=CVE-2019-10458::REFERENCE:CVE-2017-1000095:DESCRIPTION:sandbox bypass using unsafe methods that are on an allowlist:LINK:https://www.cve.org/CVERecord?id=CVE-2017-1000095::REFERENCE:CVE-2019-10458:DESCRIPTION:CI/CD pipeline feature has unsafe elements in allowlist, allowing bypass of script restrictions:LINK:https://www.cve.org/CVERecord?id=CVE-2019-10458::REFERENCE:CVE-2017-1000095:DESCRIPTION:Default allowlist includes unsafe methods, allowing bypass of sandbox:LINK:https://www.cve.org/CVERecord?id=CVE-2017-1000095::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Permissive Whitelist::
|
::120::3::43::71::
| null | null | 183
|
Incomplete List of Disallowed Inputs
|
Base
|
Draft
|
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete, leading to resultant weaknesses.
|
Developers often try to protect their products against malicious input by performing tests against inputs that are known to be bad, such as special characters that can invoke new commands. However, such lists often only account for the most well-known bad inputs. Attackers may be able to find other malicious inputs that were not expected by the developer, allowing them to bypass the intended protection mechanism.
|
::NATURE:ChildOf:CWE ID:693:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:1023:VIEW ID:1000::NATURE:CanPrecede:CWE ID:79:VIEW ID:1000:CHAIN ID:692::NATURE:CanPrecede:CWE ID:78:VIEW ID:1000::NATURE:CanPrecede:CWE ID:434:VIEW ID:1000::NATURE:CanPrecede:CWE ID:98:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Denylist / Deny List:DESCRIPTION:This is used by CWE and CAPEC instead of other commonly-used terms. Its counterpart is allowlist.::TERM:Blocklist / Block List:DESCRIPTION:This is often used by security tools such as firewalls, email or web gateways, proxies, etc.::TERM:Blacklist / Black List:DESCRIPTION:This term is frequently used, but usage has been declining as organizations have started to adopt other terms.::
|
::PHASE:Implementation:NOTE:Developers might begin to develop a list of bad inputs as a fast way to fix a particular weakness, instead of fixing the root cause. See [REF-141].::PHASE:Architecture and Design:NOTE:The design might rely solely on detection of malicious inputs as a protection mechanism.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
|
::METHOD:Black Box:DESCRIPTION:Exploitation of a vulnerability with commonly-used manipulations might fail, but minor variations might succeed.::
|
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify good input - such as lists of allowed inputs - and ensure that you are properly encoding your outputs.::
|
::REFERENCE:CVE-2008-2309:DESCRIPTION:product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2309::REFERENCE:CVE-2005-2782:DESCRIPTION:PHP remote file inclusion in web application that filters http and https URLs, but not ftp.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2782::REFERENCE:CVE-2004-0542:DESCRIPTION:Programming language does not filter certain shell metacharacters in Windows environment.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0542::REFERENCE:CVE-2004-0595:DESCRIPTION:XSS filter doesn't filter null characters before looking for dangerous tags, which are ignored by web browsers. MIE and validate-before-cleanse.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0595::REFERENCE:CVE-2005-3287:DESCRIPTION:Web-based mail product doesn't restrict dangerous extensions such as ASPX on a web server, even though others are prohibited.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3287::REFERENCE:CVE-2004-2351:DESCRIPTION:Resultant XSS when only <script> and <style> are checked.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2351::REFERENCE:CVE-2005-2959:DESCRIPTION:Privileged program does not clear sensitive environment variables that are used by bash. Overlaps multiple interpretation error.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2959::REFERENCE:CVE-2005-1824:DESCRIPTION:SQL injection protection scheme does not quote the special character.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1824::REFERENCE:CVE-2005-2184:DESCRIPTION:Detection of risky filename extensions prevents users from automatically executing .EXE files, but .LNK is accepted, allowing resultant Windows symbolic link.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2184::REFERENCE:CVE-2007-1343:DESCRIPTION:Product uses list of protected variables, but accidentally omits one dangerous variable, allowing external modification:LINK:https://www.cve.org/CVERecord?id=CVE-2007-1343::REFERENCE:CVE-2007-5727:DESCRIPTION:Chain: product only removes SCRIPT tags (CWE-184), enabling XSS (CWE-79):LINK:https://www.cve.org/CVERecord?id=CVE-2007-5727::REFERENCE:CVE-2006-4308:DESCRIPTION:Chain: product only checks for use of javascript: tag (CWE-184), allowing XSS (CWE-79) using other tags:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4308::REFERENCE:CVE-2007-3572:DESCRIPTION:Chain: OS command injection (CWE-78) enabled by using an unexpected character that is not explicitly disallowed (CWE-184):LINK:https://www.cve.org/CVERecord?id=CVE-2007-3572::REFERENCE:CVE-2002-0661:DESCRIPTION:not in list of disallowed values for web server, allowing path traversal attacks when the server is run on Windows and other OSes.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0661::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Incomplete Blacklist::
|
::120::15::182::3::43::6::71::73::85::
|
::TYPE:Relationship:NOTE:Multiple interpretation errors can indirectly introduce inputs that should be disallowed. For example, a list of dangerous shell metacharacters might not include a metacharacter that only has meaning in one particular shell, not all of them; or a check for XSS manipulations might ignore an unusual construct that is supported by one web browser, but not others.::
| null | 184
|
Overly Restrictive Regular Expression
|
Base
|
Draft
|
A regular expression is overly restrictive, which prevents dangerous values from being detected.
|
This weakness is not about regular expression complexity. Rather, it is about a regular expression that does not match all values that are intended. Consider the use of a regexp to identify acceptable values or to spot unwanted terms. An overly restrictive regexp misses some potentially security-relevant values leading to either false positives *or* false negatives, depending on how the regexp is being used within the code. Consider the expression /[0-8]/ where the intention was /[0-9]/. This expression is not complex but the value 9 is not matched when maybe the programmer planned to check for it.
|
::NATURE:ChildOf:CWE ID:185:VIEW ID:1000:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:184:VIEW ID:1000::NATURE:CanAlsoBe:CWE ID:183:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
| null |
::PHASE:Implementation:DESCRIPTION:Regular expressions can become error prone when defining a complex language even for those experienced in writing grammars. Determine if several smaller regular expressions simplify one large regular expression. Also, subject your regular expression to thorough testing techniques such as equivalence partitioning, boundary value analysis, and robustness. After testing and a reasonable confidence level is achieved, a regular expression may not be foolproof. If an exploit is allowed to slip through, then record the exploit and refactor your regular expression.::
|
::REFERENCE:CVE-2005-1604:DESCRIPTION:MIE. .php.ns bypasses .php$ regexp but is still parsed as PHP by Apache. (manipulates an equivalence property under Apache):LINK:https://www.cve.org/CVERecord?id=CVE-2005-1604::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Overly Restrictive Regular Expression::
| null |
::TYPE:Relationship:NOTE:Can overlap allowlist/denylist errors (CWE-183/CWE-184)::
| null | 186
|
Integer Overflow or Wraparound
|
Base
|
Stable
|
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
|
An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
|
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:700:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000:CHAIN ID:680::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Instability:NOTE: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:IMPACT:Modify Memory:NOTE: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:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Bypass Protection Mechanism:NOTE: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.::
|
::METHOD:Automated Static Analysis: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.:EFFECTIVENESS:High::METHOD:Black Box:DESCRIPTION:Sometimes, evidence of this weakness can be detected using dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.:EFFECTIVENESS:Moderate::METHOD:Manual Analysis: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.:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Manual Source Code Review (not inspections):EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:High::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Requirements:DESCRIPTION:Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.::PHASE:Requirements:STRATEGY:Language Selection:DESCRIPTION:Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]::PHASE:Implementation:STRATEGY:Input Validation: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. Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.::PHASE:Implementation: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:Architecture and Design: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:Compilation or Build Hardening: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.::
|
::REFERENCE:CVE-2021-43537:DESCRIPTION:Chain: in a web browser, an unsigned 64-bit integer is forcibly cast to a 32-bit integer (CWE-681) and potentially leading to an integer overflow (CWE-190). If an integer overflow occurs, this can cause heap memory corruption (CWE-122):LINK:https://www.cve.org/CVERecord?id=CVE-2021-43537::REFERENCE:CVE-2022-21668:DESCRIPTION:Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190).:LINK:https://www.cve.org/CVERecord?id=CVE-2022-21668::REFERENCE:CVE-2022-0545:DESCRIPTION:Chain: 3D renderer has an integer overflow (CWE-190) leading to write-what-where condition (CWE-123) using a crafted image.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-0545::REFERENCE:CVE-2021-30860:DESCRIPTION:Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-30860::REFERENCE:CVE-2021-30663:DESCRIPTION:Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-30663::REFERENCE:CVE-2018-10887:DESCRIPTION:Chain: unexpected sign extension (CWE-194) leads to integer overflow (CWE-190), causing an out-of-bounds read (CWE-125):LINK:https://www.cve.org/CVERecord?id=CVE-2018-10887::REFERENCE:CVE-2019-1010006:DESCRIPTION:Chain: compiler optimization (CWE-733) removes or modifies code used to detect integer overflow (CWE-190), allowing out-of-bounds write (CWE-787).:LINK:https://www.cve.org/CVERecord?id=CVE-2019-1010006::REFERENCE:CVE-2010-1866:DESCRIPTION:Chain: integer overflow (CWE-190) causes a negative signed value, which later bypasses a maximum-only check (CWE-839), leading to heap-based buffer overflow (CWE-122).:LINK:https://www.cve.org/CVERecord?id=CVE-2010-1866::REFERENCE:CVE-2010-2753:DESCRIPTION:Chain: integer overflow leads to use-after-free:LINK:https://www.cve.org/CVERecord?id=CVE-2010-2753::REFERENCE:CVE-2005-1513:DESCRIPTION:Chain: integer overflow in securely-coded mail program leads to buffer overflow. In 2005, this was regarded as unrealistic to exploit, but in 2020, it was rediscovered to be easier to exploit due to evolutions of the technology.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1513::REFERENCE:CVE-2002-0391:DESCRIPTION:Integer overflow via a large number of arguments.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0391::REFERENCE:CVE-2002-0639:DESCRIPTION:Integer overflow in OpenSSH as listed in the demonstrative examples.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0639::REFERENCE:CVE-2005-1141:DESCRIPTION:Image with large width and height leads to integer overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1141::REFERENCE:CVE-2005-0102:DESCRIPTION:Length value of -1 leads to allocation of 0 bytes and resultant heap overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0102::REFERENCE:CVE-2004-2013:DESCRIPTION:Length value of -1 leads to allocation of 0 bytes and resultant heap overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2013::REFERENCE:CVE-2017-1000121:DESCRIPTION:chain: unchecked message size metadata allows integer overflow (CWE-190) leading to buffer overflow (CWE-119).:LINK:https://www.cve.org/CVERecord?id=CVE-2017-1000121::REFERENCE:CVE-2013-1591:DESCRIPTION:Chain: an integer overflow (CWE-190) in the image size calculation causes an infinite loop (CWE-835) which sequentially allocates buffers without limits (CWE-1325) until the stack is full.:LINK:https://www.cve.org/CVERecord?id=CVE-2013-1591::
|
::Number Processing::Memory Management::Counters::
| null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Integer overflow (wrap or wraparound)::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Integer Overflow::TAXONOMY NAME:CLASP:ENTRY NAME:Integer overflow::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT18-C:ENTRY NAME:Evaluate integer expressions in a larger size before comparing or assigning to that size:MAPPING FIT:CWE More Abstract::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT30-C:ENTRY NAME:Ensure that unsigned integer operations do not wrap:MAPPING FIT:CWE More Abstract::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT32-C:ENTRY NAME:Ensure that operations on signed integers do not result in overflow:MAPPING FIT:Imprecise::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:INT35-C:ENTRY NAME:Evaluate integer expressions in a larger size before comparing or assigning to that size::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:MEM07-C:ENTRY NAME:Ensure that the arguments to calloc(), when multiplied, do not wrap:MAPPING FIT:CWE More Abstract::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:MEM35-C:ENTRY NAME:Allocate sufficient memory for an object::TAXONOMY NAME:WASC:ENTRY ID:3:ENTRY NAME:Integer Overflows::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP1:ENTRY NAME:Glitch in computation::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 3.5::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 7.2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SR-2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SI-2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SVV-1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SVV-3::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 3.5::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 7.2::
|
::92::
|
::TYPE:Relationship:NOTE:Integer overflows can be primary to buffer overflows.::TYPE:Terminology:NOTE:Integer overflow is sometimes used to cover several types of errors, including signedness errors, or buffer overflows that involve manipulation of integer data types instead of characters. Part of the confusion results from the fact that 0xffffffff is -1 in a signed context. Other confusion also arises because of the role that integer overflows have in chains.::
| null | 190
|
Integer Underflow (Wrap or Wraparound)
|
Base
|
Draft
|
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
|
This can happen in signed and unsigned cases.
|
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C#:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:Integer underflow:DESCRIPTION:Integer underflow is sometimes used to identify signedness errors in which an originally positive number becomes negative as a result of subtraction. However, there are cases of bad subtraction in which unsigned integers are involved, so it's not always a signedness issue. Integer underflow is occasionally used to describe array index errors in which the index is negative.::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Instability:NOTE: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:IMPACT:Modify Memory:NOTE: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:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Bypass Protection Mechanism:NOTE: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.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-2004-0816:DESCRIPTION:Integer underflow in firewall via malformed packet.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0816::REFERENCE:CVE-2004-1002:DESCRIPTION:Integer underflow by packet with invalid length.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1002::REFERENCE:CVE-2005-0199:DESCRIPTION:Long input causes incorrect length calculation.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0199::REFERENCE:CVE-2005-1891:DESCRIPTION:Malformed icon causes integer underflow in loop counter variable.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1891::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Integer underflow (wrap or wraparound)::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP1:ENTRY NAME:Glitch in computation::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:INT32-C:ENTRY NAME:Ensure that operations on signed integers do not result in overflow:MAPPING FIT:Imprecise::
| null | null | null | 191
|
Off-by-one Error
|
Base
|
Draft
|
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
| null |
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:682:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:617:VIEW ID:1000::NATURE:CanPrecede:CWE ID:170:VIEW ID:1000::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null |
::TERM:off-by-five:DESCRIPTION:An off-by-five error was reported for sudo in 2002 (CVE-2002-0184), but that is more like a length calculation error.::
|
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Instability:NOTE: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:IMPACT:Modify Memory:NOTE: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:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Bypass Protection Mechanism:NOTE: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.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:DESCRIPTION:When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().::
|
::REFERENCE:CVE-2003-0252:DESCRIPTION:Off-by-one error allows remote attackers to cause a denial of service and possibly execute arbitrary code via requests that do not contain newlines.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0252::REFERENCE:CVE-2001-1391:DESCRIPTION:Off-by-one vulnerability in driver allows users to modify kernel memory.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1391::REFERENCE:CVE-2002-0083:DESCRIPTION:Off-by-one error allows local users or remote malicious servers to gain privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0083::REFERENCE:CVE-2002-0653:DESCRIPTION:Off-by-one buffer overflow in function usd by server allows local users to execute arbitrary code as the server user via .htaccess files with long entries.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0653::REFERENCE:CVE-2002-0844:DESCRIPTION:Off-by-one buffer overflow in version control system allows local users to execute arbitrary code.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0844::REFERENCE:CVE-1999-1568:DESCRIPTION:Off-by-one error in FTP server allows a remote attacker to cause a denial of service (crash) via a long PORT command.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1568::REFERENCE:CVE-2004-0346:DESCRIPTION:Off-by-one buffer overflow in FTP server allows local users to gain privileges via a 1024 byte RETR command.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0346::REFERENCE:CVE-2004-0005:DESCRIPTION:Multiple buffer overflows in chat client allow remote attackers to cause a denial of service and possibly execute arbitrary code.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0005::REFERENCE:CVE-2003-0356:DESCRIPTION:Multiple off-by-one vulnerabilities in product allow remote attackers to cause a denial of service and possibly execute arbitrary code.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0356::REFERENCE:CVE-2001-1496:DESCRIPTION:Off-by-one buffer overflow in server allows remote attackers to cause a denial of service and possibly execute arbitrary code.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1496::REFERENCE:CVE-2004-0342:DESCRIPTION:This is an interesting example that might not be an off-by-one.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0342::REFERENCE:CVE-2001-0609:DESCRIPTION:An off-by-one enables a terminating null to be overwritten, which causes 2 strings to be merged and enable a format string.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0609::REFERENCE:CVE-2002-1745:DESCRIPTION:Off-by-one error allows source code disclosure of files with 4 letter extensions that match an accepted 3-letter extension.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1745::REFERENCE:CVE-2002-1816:DESCRIPTION:Off-by-one buffer overflow.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1816::REFERENCE:CVE-2002-1721:DESCRIPTION:Off-by-one error causes an snprintf call to overwrite a critical internal variable with a null value.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1721::REFERENCE:CVE-2003-0466:DESCRIPTION:Off-by-one error in function used in many products leads to a buffer overflow during pathname management, as demonstrated using multiple commands in an FTP server.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0466::REFERENCE:CVE-2003-0625:DESCRIPTION:Off-by-one error allows read of sensitive memory via a malformed request.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0625::REFERENCE:CVE-2006-4574:DESCRIPTION:Chain: security monitoring product has an off-by-one error that leads to unexpected length values, triggering an assertion.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4574::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Off-by-one Error::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::
| null |
::TYPE:Relationship:NOTE:This is not always a buffer overflow. For example, an off-by-one error could be a factor in a partial comparison, a read from the wrong memory location, an incorrect conditional, etc.::
| null | 193
|
Insertion of Sensitive Information Into Sent Data
|
Base
|
Draft
|
The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor.
|
Sensitive information could include data that is sensitive in and of itself (such as credentials or private messages), or otherwise useful in the further exploitation of the system (such as internal file system structure).
|
::NATURE:ChildOf:CWE ID:200:VIEW ID:1000:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:209:VIEW ID:1000::NATURE:CanAlsoBe:CWE ID:202:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Files or Directories:IMPACT:Read Memory:IMPACT:Read Application Data:NOTE:Sensitive data may be exposed to attackers.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Requirements:DESCRIPTION:Specify which data in the software should be regarded as sensitive. Consider which types of users should have access to which types of data.::PHASE:Implementation:DESCRIPTION:Ensure that any possibly sensitive data specified in the requirements is verified with designers to ensure that it is either a calculated risk or mitigated elsewhere. Any information that is not necessary to the functionality should be removed in order to lower both the overhead and the possibility of security sensitive data being sent.::PHASE:System Configuration:DESCRIPTION:Setup default error messages so that unexpected errors do not disclose sensitive information.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2022-0708:DESCRIPTION:Collaboration platform does not clear team emails in a response, allowing leak of email addresses:LINK:https://www.cve.org/CVERecord?id=CVE-2022-0708::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Accidental leaking of sensitive information through sent data::
|
::12::217::612::613::618::619::621::622::623::
| null | null | 201
|
Observable Response Discrepancy
|
Base
|
Incomplete
|
The product provides different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside of the intended control sphere.
|
This issue frequently occurs during authentication, where a difference in failed-login messages could allow an attacker to determine if the username is valid or not. These exposures can be inadvertent (bug) or intentional (design).
|
::NATURE:ChildOf:CWE ID:203:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism::
| null |
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::PHASE:Implementation:DESCRIPTION:Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.::
|
::REFERENCE:CVE-2002-2094:DESCRIPTION:This, and others, use .. attacks and monitor error responses, so there is overlap with directory traversal.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2094::REFERENCE:CVE-2001-1483:DESCRIPTION:Enumeration of valid usernames based on inconsistent responses:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1483::REFERENCE:CVE-2001-1528:DESCRIPTION:Account number enumeration via inconsistent responses.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1528::REFERENCE:CVE-2004-2150:DESCRIPTION:User enumeration via discrepancies in error messages.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2150::REFERENCE:CVE-2005-1650:DESCRIPTION:User enumeration via discrepancies in error messages.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1650::REFERENCE:CVE-2004-0294:DESCRIPTION:Bulletin Board displays different error messages when a user exists or not, which makes it easier for remote attackers to identify valid users and conduct a brute force password guessing attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0294::REFERENCE:CVE-2004-0243:DESCRIPTION:Operating System, when direct remote login is disabled, displays a different message if the password is correct, which allows remote attackers to guess the password via brute force methods.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0243::REFERENCE:CVE-2002-0514:DESCRIPTION:Product allows remote attackers to determine if a port is being filtered because the response packet TTL is different than the default TTL.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0514::REFERENCE:CVE-2002-0515:DESCRIPTION:Product sets a different TTL when a port is being filtered than when it is not being filtered, which allows remote attackers to identify filtered ports by comparing TTLs.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0515::REFERENCE:CVE-2001-1387:DESCRIPTION:Product may generate different responses than specified by the administrator, possibly leading to an information leak.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1387::REFERENCE:CVE-2004-0778:DESCRIPTION:Version control system allows remote attackers to determine the existence of arbitrary files and directories via the -X command for an alternate history file, which causes different error messages to be returned.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0778::REFERENCE:CVE-2004-1428:DESCRIPTION:FTP server generates an error message if the user name does not exist instead of prompting for a password, which allows remote attackers to determine valid usernames.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1428::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Response discrepancy infoleak::
|
::331::332::541::580::
|
::TYPE:Relationship:NOTE:can overlap errors related to escalated privileges::
| null | 204
|
Observable Behavioral Discrepancy
|
Base
|
Incomplete
|
The product's behaviors indicate important differences that may be observed by unauthorized actors in a way that reveals (1) its internal state or decision process, or (2) differences from other products with equivalent functionality.
|
Ideally, a product should provide as little information about its internal operations as possible. Otherwise, attackers could use knowledge of these internal operations to simplify or optimize their attack. In some cases, behavioral discrepancies can be used by attackers to form a side channel.
|
::NATURE:ChildOf:CWE ID:203:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:514:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism::
| null | null |
::REFERENCE:CVE-2002-0208:DESCRIPTION:Product modifies TCP/IP stack and ICMP error messages in unusual ways that show the product is in use.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0208::REFERENCE:CVE-2004-2252:DESCRIPTION:Behavioral infoleak by responding to SYN-FIN packets.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2252::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Behavioral Discrepancy Infoleak::TAXONOMY NAME:WASC:ENTRY ID:45:ENTRY NAME:Fingerprinting::
|
::541::580::
| null | null | 205
|
Observable Timing Discrepancy
|
Base
|
Incomplete
|
Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.
|
In security-relevant contexts, even small variations in timing can be exploited by attackers to indirectly infer certain details about the product's internal operations. For example, in some cryptographic algorithms, attackers can use timing differences to infer certain properties about a private key, making the key easier to guess. Timing discrepancies effectively form a timing side channel.
|
::NATURE:ChildOf:CWE ID:203:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:385:VIEW ID:1000::NATURE:CanPrecede:CWE ID:327:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::PHASE:Implementation::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism::
| null | null |
::REFERENCE:CVE-2019-10071:DESCRIPTION:Java-oriented framework compares HMAC signatures using String.equals() instead of a constant-time algorithm, causing timing discrepancies:LINK:https://www.cve.org/CVERecord?id=CVE-2019-10071::REFERENCE:CVE-2019-10482:DESCRIPTION:Smartphone OS uses comparison functions that are not in constant time, allowing side channels:LINK:https://www.cve.org/CVERecord?id=CVE-2019-10482::REFERENCE:CVE-2014-0984:DESCRIPTION:Password-checking function in router terminates validation of a password entry when it encounters the first incorrect character, which allows remote attackers to obtain passwords via a brute-force attack that relies on timing differences in responses to incorrect password guesses, aka a timing side-channel attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2014-0984::REFERENCE:CVE-2003-0078:DESCRIPTION:SSL implementation does not perform a MAC computation if an incorrect block cipher padding is used, which causes an information leak (timing discrepancy) that may make it easier to launch cryptographic attacks that rely on distinguishing between padding and MAC verification errors, possibly leading to extraction of the original plaintext, aka the Vaudenay timing attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0078::REFERENCE:CVE-2000-1117:DESCRIPTION:Virtual machine allows malicious web site operators to determine the existence of files on the client by measuring delays in the execution of the getSystemResource method.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1117::REFERENCE:CVE-2003-0637:DESCRIPTION:Product uses a shorter timeout for a non-existent user than a valid user, which makes it easier for remote attackers to guess usernames and conduct brute force password guessing.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0637::REFERENCE:CVE-2003-0190:DESCRIPTION:Product immediately sends an error message when a user does not exist, which allows remote attackers to determine valid usernames via a timing attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0190::REFERENCE:CVE-2004-1602:DESCRIPTION:FTP server responds in a different amount of time when a given username exists, which allows remote attackers to identify valid usernames by timing the server response.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1602::REFERENCE:CVE-2005-0918:DESCRIPTION:Browser allows remote attackers to determine the existence of arbitrary files by setting the src property to the target filename and using Javascript to determine if the web page immediately stops loading, which indicates whether the file exists or not.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0918::
|
::Cryptography::Authentication::
| null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Timing discrepancy infoleak::
|
::462::541::580::
|
::TYPE:Relationship:NOTE:Often primary in cryptographic applications and algorithms.::
| null | 208
|
Generation of Error Message Containing Sensitive Information
|
Base
|
Draft
|
The product generates an error message that includes sensitive information about its environment, users, or associated data.
|
The sensitive information may be valuable information on its own (such as a password), or it may be useful for launching other, more serious attacks. The error message may be created in different ways: self-generated: the source code explicitly constructs the error message and delivers it externally-generated: the external environment, such as a language interpreter, handles the error and constructs its own message, whose contents are not under direct control by the programmer An attacker may use the contents of error messages to help launch another, more focused attack. For example, an attempt to exploit a path traversal weakness (CWE-22) might yield the full pathname of the installed application. In turn, this could be used to select the proper number of .. sequences to navigate to the targeted file. An attack using SQL injection (CWE-89) might not initially succeed, but an error message could reveal the malformed query, which would expose query logic and possibly even passwords or other sensitive information used within the query.
|
::NATURE:ChildOf:CWE ID:200:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:200:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:755:VIEW ID:1000::
|
::ORDINALITY:Primary::ORDINALITY:Resultant::
|
::LANGUAGE NAME:PHP:LANGUAGE PREVALENCE:Often::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Often::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:System Configuration::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Often this will either reveal sensitive information which may be used for a later attack or private information stored in the server.::
|
::METHOD:Manual Analysis:DESCRIPTION:This weakness generally requires domain-specific interpretation using manual analysis. However, the number of potential error conditions may be too large to cover completely within limited time constraints.:EFFECTIVENESS:High::METHOD:Automated Analysis:DESCRIPTION:Automated methods may be able to detect certain idioms automatically, such as exposed stack traces or pathnames, but violation of business rules or privacy requirements is not typically feasible.:EFFECTIVENESS:Moderate::METHOD:Automated Dynamic Analysis: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. Error conditions may be triggered with a stress-test by calling the software simultaneously from a large number of threads or processes, and look for evidence of any unexpected behavior.:EFFECTIVENESS:Moderate::METHOD:Manual Dynamic Analysis:DESCRIPTION:Identify error conditions that are not likely to occur during normal usage and trigger them. For example, run the program under low memory conditions, run with insufficient privileges or permissions, interrupt a transaction before it is completed, or disable connectivity to basic network services such as DNS. Monitor the software for any unexpected behavior. If you trigger an unhandled exception or similar error that was discovered and handled by the application's environment, it may still indicate unexpected conditions that were not handled by the application itself.::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.)::
|
::PHASE:Implementation:DESCRIPTION:Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.::PHASE:Implementation:DESCRIPTION:Handle exceptions internally and do not display errors containing potentially sensitive information to a user.::PHASE:Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.:EFFECTIVENESS:Defense in Depth::PHASE:Implementation Build and Compilation:STRATEGY:Compilation or Build Hardening:DESCRIPTION:Debugging information should not make its way into a production release.::PHASE:Implementation Build and Compilation:STRATEGY:Environment Hardening:DESCRIPTION:Debugging information should not make its way into a production release.::PHASE:System Configuration:DESCRIPTION:Where available, configure the environment to use less verbose error messages. For example, in PHP, disable the display_errors setting during configuration, or at runtime using the error_reporting() function.::PHASE:System Configuration:DESCRIPTION:Create default error pages or messages that do not leak any information.::
|
::REFERENCE:CVE-2008-2049:DESCRIPTION:POP3 server reveals a password in an error message after multiple APOP commands are sent. Might be resultant from another weakness.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2049::REFERENCE:CVE-2007-5172:DESCRIPTION:Program reveals password in error message if attacker can trigger certain database errors.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-5172::REFERENCE:CVE-2008-4638:DESCRIPTION:Composite: application running with high privileges (CWE-250) allows user to specify a restricted file to process, which generates a parsing error that leaks the contents of the file (CWE-209).:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4638::REFERENCE:CVE-2008-1579:DESCRIPTION:Existence of user names can be determined by requesting a nonexistent blog and reading the error message.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-1579::REFERENCE:CVE-2007-1409:DESCRIPTION:Direct request to library file in web application triggers pathname leak in error message.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-1409::REFERENCE:CVE-2008-3060:DESCRIPTION:Malformed input to login page causes leak of full path when IMAP call fails.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-3060::REFERENCE:CVE-2005-0603:DESCRIPTION:Malformed regexp syntax leads to information exposure in error message.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0603::REFERENCE:CVE-2017-9615:DESCRIPTION:verbose logging stores admin credentials in a world-readablelog file:LINK:https://www.cve.org/CVERecord?id=CVE-2017-9615::REFERENCE:CVE-2018-1999036:DESCRIPTION:SSH password for private key stored in build log:LINK:https://www.cve.org/CVERecord?id=CVE-2018-1999036::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Accidental leaking of sensitive information through error messages::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A6:ENTRY NAME:Information Leakage and Improper Error Handling:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A7:ENTRY NAME:Improper Error Handling:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A10:ENTRY NAME:Insecure Configuration Management:MAPPING FIT:CWE More Specific::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:ERR01-J:ENTRY NAME:Do not allow exceptions to expose sensitive information::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::
|
::215::463::54::7::
| null | null | 209
|
Improper Removal of Sensitive Information Before Storage or Transfer
|
Base
|
Incomplete
|
The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.
|
Resources that may contain sensitive data include documents, packets, messages, databases, etc. While this data may be useful to an individual user or small set of users who share the resource, it may need to be removed before the resource can be shared outside of the trusted group. The process of removal is sometimes called cleansing or scrubbing. For example, a product for editing documents might not remove sensitive data such as reviewer comments or the local pathname where the document is stored. Or, a proxy might not remove an internal IP address from headers before making an outgoing request to an Internet site.
|
::NATURE:ChildOf:CWE ID:669:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:669:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:201:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::ORDINALITY:Resultant::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Files or Directories:IMPACT:Read Application Data:NOTE:Sensitive data may be exposed to an unauthorized actor in another control sphere. This may have a wide range of secondary consequences which will depend on what data is exposed. One possibility is the exposure of system data allowing an attacker to craft a specific, more effective attack.::
| null |
::PHASE:Requirements:DESCRIPTION:Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::PHASE:Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.:EFFECTIVENESS:Defense in Depth::PHASE:Implementation:DESCRIPTION:Avoid errors related to improper resource shutdown or release (CWE-404), which may leave the sensitive data within the resource if it is in an incomplete state.::
|
::REFERENCE:CVE-2019-3733:DESCRIPTION:Cryptography library does not clear heap memory before release:LINK:https://www.cve.org/CVERecord?id=CVE-2019-3733::REFERENCE:CVE-2005-0406:DESCRIPTION:Some image editors modify a JPEG image, but the original EXIF thumbnail image is left intact within the JPEG. (Also an interaction error).:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0406::REFERENCE:CVE-2002-0704:DESCRIPTION:NAT feature in firewall leaks internal IP addresses in ICMP error messages.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0704::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Cross-Boundary Cleansing Infoleak::
|
::168::
|
::TYPE:Relationship:NOTE:This entry is intended to be different from resultant information leaks, including those that occur from improper buffer initialization and reuse, improper encryption, interaction errors, and multiple interpretation errors. This entry could be regarded as a privacy leak, depending on the type of information that is leaked.::TYPE:Relationship:NOTE:There is a close association between CWE-226 and CWE-212. The difference is partially that of perspective. CWE-226 is geared towards the final stage of the resource lifecycle, in which the resource is deleted, eliminated, expired, or otherwise released for reuse. Technically, this involves a transfer to a different control sphere, in which the original contents of the resource are no longer relevant. CWE-212, however, is intended for sensitive data in resources that are intentionally shared with others, so they are still active. This distinction is useful from the perspective of the CWE research view (CWE-1000).::TYPE:Terminology:NOTE:The terms cleansing and scrubbing have multiple uses within computing. In information security, these are used for the removal of sensitive data, but they are also used for the modification of incoming/outgoing data so that it conforms to specifications.::
| null | 212
|
Exposure of Sensitive Information Due to Incompatible Policies
|
Base
|
Draft
|
The product's intended functionality exposes information to certain actors in accordance with the developer's security policy, but this information is regarded as sensitive according to the intended security policies of other stakeholders such as the product's administrator, users, or others whose information is being processed.
|
When handling information, the developer must consider whether the information is regarded as sensitive by different stakeholders, such as users or administrators. Each stakeholder effectively has its own intended security policy that the product is expected to uphold. When a developer does not treat that information as sensitive, this can introduce a vulnerability that violates the expectations of the product's users.
|
::NATURE:ChildOf:CWE ID:200:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Policy:NOTE:This can occur when the product's policy does not account for all relevant stakeholders, or when the policies of other stakeholders are not interpreted properly.::PHASE:Requirements:NOTE:This can occur when requirements do not explicitly account for all relevant stakeholders.::PHASE:Architecture and Design:NOTE:Communications or data exchange frameworks may be chosen that exchange or provide access to more information than strictly needed.::PHASE:Implementation:NOTE:This can occur when the developer does not properly track the flow of sensitive information and how it is exposed, e.g., via an API.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data::
| null | null |
::REFERENCE:CVE-2002-1725:DESCRIPTION:Script calls phpinfo():LINK:https://www.cve.org/CVERecord?id=CVE-2002-1725::REFERENCE:CVE-2004-0033:DESCRIPTION:Script calls phpinfo():LINK:https://www.cve.org/CVERecord?id=CVE-2004-0033::REFERENCE:CVE-2003-1181:DESCRIPTION:Script calls phpinfo():LINK:https://www.cve.org/CVERecord?id=CVE-2003-1181::REFERENCE:CVE-2004-1422:DESCRIPTION:Script calls phpinfo():LINK:https://www.cve.org/CVERecord?id=CVE-2004-1422::REFERENCE:CVE-2004-1590:DESCRIPTION:Script calls phpinfo():LINK:https://www.cve.org/CVERecord?id=CVE-2004-1590::REFERENCE:CVE-2003-1038:DESCRIPTION:Product lists DLLs and full pathnames.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1038::REFERENCE:CVE-2005-1205:DESCRIPTION:Telnet protocol allows servers to obtain sensitive environment information from clients.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1205::REFERENCE:CVE-2005-0488:DESCRIPTION:Telnet protocol allows servers to obtain sensitive environment information from clients.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0488::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Intended information leak::
| null |
::TYPE:Maintenance:NOTE:This entry is being considered for deprecation. It overlaps many other entries related to information exposures. It might not be essential to preserve this entry, since other key stakeholder policies are covered elsewhere, e.g. personal privacy leaks (CWE-359) and system-level exposures that are important to system administrators (CWE-497).::TYPE:Theoretical:NOTE:In vulnerability theory terms, this covers cases in which the developer's Intended Policy allows the information to be made available, but the information might be in violation of a Universal Policy in which the product's administrator should have control over which information is considered sensitive and therefore should not be exposed.::
| null | 213
|
Invocation of Process Using Visible Sensitive Information
|
Base
|
Incomplete
|
A process is invoked with sensitive command-line arguments, environment variables, or other elements that can be seen by other processes on the operating system.
|
Many operating systems allow a user to list information about processes that are owned by other users. Other users could see information such as command line arguments or environment variable settings. When this data contains sensitive information such as credentials, it might allow other users to launch an attack against the product or related resources.
|
::NATURE:ChildOf:CWE ID:497:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data::
| null | null |
::REFERENCE:CVE-2005-1387:DESCRIPTION:password passed on command line:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1387::REFERENCE:CVE-2005-2291:DESCRIPTION:password passed on command line:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2291::REFERENCE:CVE-2001-1565:DESCRIPTION:username/password on command line allows local users to view via ps or other process listing programs:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1565::REFERENCE:CVE-2004-1948:DESCRIPTION:Username/password on command line allows local users to view via ps or other process listing programs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1948::REFERENCE:CVE-1999-1270:DESCRIPTION:PGP passphrase provided as command line argument.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1270::REFERENCE:CVE-2004-1058:DESCRIPTION:Kernel race condition allows reading of environment variables of a process that is still spawning.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1058::REFERENCE:CVE-2021-32638:DESCRIPTION:Code analysis product passes access tokens as a command-line parameter or through an environment variable, making them visible to other processes via the ps command.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-32638::
| null |
::System Process::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Process information infoleak to other processes::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::
| null |
::TYPE:Research Gap:NOTE:Under-studied, especially environment variables.::
| null | 214
|
Insertion of Sensitive Information Into Debugging Code
|
Base
|
Draft
|
The product inserts sensitive information into debugging code, which could expose this information if the debugging code is not disabled in production.
|
When debugging, it may be necessary to report detailed information to the programmer. However, if the debugging code is not disabled when the product is operating in a production environment, then this sensitive information may be exposed to attackers.
|
::NATURE:ChildOf:CWE ID:200:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:DESCRIPTION:Do not leave debug statements that could be executed in the source code. Ensure that all debug information is eradicated before releasing the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2004-2268:DESCRIPTION:Password exposed in debug information.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2268::REFERENCE:CVE-2002-0918:DESCRIPTION:CGI script includes sensitive information in debug messages when an error is triggered.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0918::REFERENCE:CVE-2003-1078:DESCRIPTION:FTP client with debug option enabled shows password to the screen.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1078::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Infoleak Using Debug Information::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A6:ENTRY NAME:Information Leakage and Improper Error Handling:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A10:ENTRY NAME:Insecure Configuration Management:MAPPING FIT:CWE More Specific::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::
| null |
::TYPE:Relationship:NOTE:This overlaps other categories.::
| null | 215
|
Truncation of Security-relevant Information
|
Base
|
Draft
|
The product truncates the display, recording, or processing of security-relevant information in a way that can obscure the source or nature of an attack.
| null |
::NATURE:ChildOf:CWE ID:221:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::PHASE:Operation::
| null | null |
::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:The source of an attack will be difficult or impossible to determine. This can allow attacks to the system to continue without notice.::
| null | null |
::REFERENCE:CVE-2005-0585:DESCRIPTION:Web browser truncates long sub-domains or paths, facilitating phishing.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0585::REFERENCE:CVE-2004-2032:DESCRIPTION:Bypass URL filter via a long URL with a large number of trailing hex-encoded space characters.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2032::REFERENCE:CVE-2003-0412:DESCRIPTION:application server does not log complete URI of a long request (truncation).:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0412::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Truncation of Security-relevant Information::
| null | null | null | 222
|
Omission of Security-relevant Information
|
Base
|
Draft
|
The product does not record or display information that would be important for identifying the source or nature of an attack, or determining if an action is safe.
| null |
::NATURE:ChildOf:CWE ID:221:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::PHASE:Implementation::PHASE:Operation::
| null | null |
::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:The source of an attack will be difficult or impossible to determine. This can allow attacks to the system to continue without notice.::
| null | null |
::REFERENCE:CVE-1999-1029:DESCRIPTION:Login attempts are not recorded if the user disconnects before the maximum number of tries.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1029::REFERENCE:CVE-2002-1839:DESCRIPTION:Sender's IP address not recorded in outgoing e-mail.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1839::REFERENCE:CVE-2000-0542:DESCRIPTION:Failed authentication attempts are not recorded if later attempt succeeds.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0542::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Omission of Security-relevant Information::
| null | null | null | 223
|
Obscured Security-relevant Information by Alternate Name
|
Base
|
Incomplete
|
The product records security-relevant information according to an alternate name of the affected entity, instead of the canonical name.
| null |
::NATURE:ChildOf:CWE ID:221:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Non-Repudiation:SCOPE:Access Control:IMPACT:Hide Activities:IMPACT:Gain Privileges or Assume Identity::
| null | null |
::REFERENCE:CVE-2002-0725:DESCRIPTION:Attacker performs malicious actions on a hard link to a file, obscuring the real target file.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0725::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Obscured Security-relevant Information by Alternate Name::
| null | null | null | 224
|
Improper Handling of Values
|
Base
|
Incomplete
|
The product does not properly handle when the expected number of values for parameters, fields, or arguments is not provided in input, or if those values are undefined.
| null |
::NATURE:ChildOf:CWE ID:228:VIEW ID:1000:ORDINAL:Primary::
| null | null | null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
| null | null | null | null | null | null | null | null | null | 229
|
Improper Handling of Parameters
|
Base
|
Incomplete
|
The product does not properly handle when the expected number of parameters, fields, or arguments is not provided in input, or if those parameters are undefined.
| null |
::NATURE:ChildOf:CWE ID:228:VIEW ID:1000:ORDINAL:Primary::
| null | null | null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
|
::METHOD:Fuzzing:DESCRIPTION:Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.:EFFECTIVENESS:High::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null | null | null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Parameter Problems::
|
::39::
| null | null | 233
|
Improper Handling of Structural Elements
|
Base
|
Incomplete
|
The product does not handle or incorrectly handles inputs that are related to complex structures.
| null |
::NATURE:ChildOf:CWE ID:228:VIEW ID:1000:ORDINAL:Primary::
| null | null | null | null | null | null | null |
::SCOPE:Integrity:IMPACT:Unexpected State::
| null | null | null | null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Element Problems::
| null | null | null | 237
|
Improper Handling of Unexpected Data Type
|
Base
|
Draft
|
The product does not handle or incorrectly handles when a particular element is not the expected type, e.g. it expects a digit (0-9) but is provided with a letter (A-Z).
| null |
::NATURE:ChildOf:CWE ID:228:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State::
| null |
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-1999-1156:DESCRIPTION:FTP server crash via PORT command with non-numeric character.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1156::REFERENCE:CVE-2004-0270:DESCRIPTION:Anti-virus product has assert error when line length is non-numeric.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0270::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Wrong Data Type::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO37-C:ENTRY NAME:Do not assume that fgets() or fgetws() returns a nonempty string when successful:MAPPING FIT:CWE More Abstract::
|
::48::
|
::TYPE:Research Gap:NOTE:Probably under-studied.::
| null | 241
|
Use of Inherently Dangerous Function
|
Base
|
Draft
|
The product calls a function that can never be guaranteed to work safely.
|
Certain functions behave in dangerous ways regardless of how they are used. Functions in this category were often implemented without taking security concerns into account. The gets() function is unsafe because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer. Similarly, the >> operator is unsafe to use when reading into a statically-allocated character array because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.
|
::NATURE:ChildOf:CWE ID:1177:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Other:IMPACT:Varies by Context::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation Requirements:DESCRIPTION:Ban the use of dangerous functions. Use their safe equivalent.::PHASE:Testing:DESCRIPTION:Use grep or static analysis tools to spot usage of dangerous functions.::
|
::REFERENCE:CVE-2007-4004:DESCRIPTION:FTP client uses inherently insecure gets() function and is setuid root on some systems, allowing buffer overflow:LINK:https://www.cve.org/CVERecord?id=CVE-2007-4004::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Dangerous Functions::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS33-C:ENTRY NAME:Do not use vfork():MAPPING FIT:CWE More Abstract::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP3:ENTRY NAME:Use of an improper API::
| null | null | null | 242
|
Creation of chroot Jail Without Changing Working Directory
|
Variant
|
Draft
|
The product uses the chroot() system call to create a jail, but does not change the working directory afterward. This does not prevent access to files outside of the jail.
|
Improper use of chroot() may allow attackers to escape from the chroot jail. The chroot() function call does not change the process's current working directory, so relative paths may still refer to file system resources outside of the chroot jail after chroot() has been called.
|
::NATURE:ChildOf:CWE ID:573:VIEW ID:1000::NATURE:ChildOf:CWE ID:669:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Resultant::
|
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Unix:OPERATING SYSTEM PREVALENCE:Undetermined::
|
::The chroot() system call allows a process to change its perception of the root directory of the file system. After properly invoking chroot(), a process cannot access any files outside the directory tree defined by the new root directory. Such an environment is called a chroot jail and is commonly used to prevent the possibility that a processes could be subverted and used to access unauthorized files. For instance, many FTP servers run in chroot jails to prevent an attacker who discovers a new vulnerability in the server from being able to download the password file or other sensitive files on the system.::
| null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Files or Directories::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null | null | null |
::File or Directory::
|
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Directory Restriction::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP17:ENTRY NAME:Failed chroot jail::
| null | null | null | 243
|
Uncaught Exception
|
Base
|
Draft
|
An exception is thrown from a function, but it is not caught.
|
When an exception is not caught, it may cause the program to crash or expose sensitive information.
|
::NATURE:ChildOf:CWE ID:705:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:755:VIEW ID:1000::NATURE:ChildOf:CWE ID:703:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:703:VIEW ID:1340:ORDINAL:Primary::
| null |
::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C#:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:SCOPE:Confidentiality:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Read Application Data:NOTE:An uncaught exception could cause the system to be placed in a state that could lead to a crash, exposure of sensitive information or other unintended behaviors.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-2023-41151:DESCRIPTION:SDK for OPC Unified Architecture (OPC UA) server has uncaught exception when a socket is blocked for writing but the server tries to send an error:LINK:https://www.cve.org/CVERecord?id=CVE-2023-41151::REFERENCE:CVE-2023-21087:DESCRIPTION:Java code in a smartphone OS can encounter a boot loop due to an uncaught exception:LINK:https://www.cve.org/CVERecord?id=CVE-2023-21087::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Often Misused: Exception Handling::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:ERR05-J:ENTRY NAME:Do not let checked exceptions escape from a finally block::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:ERR06-J:ENTRY NAME:Do not throw undeclared checked exceptions::TAXONOMY NAME:SEI CERT Perl Coding Standard:ENTRY ID:EXP31-PL:ENTRY NAME:Do not suppress or ignore exceptions:MAPPING FIT:Exact::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP4:ENTRY NAME:Unchecked Status Condition::
| null | null | null | 248
|
Execution with Unnecessary Privileges
|
Base
|
Draft
|
The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.
|
New weaknesses can be exposed because running with extra privileges, such as root or Administrator, can disable the normal security checks being performed by the operating system or surrounding environment. Other pre-existing weaknesses can turn into security vulnerabilities if they occur while operating at raised privileges. Privilege management functions can behave in some less-than-obvious ways, and they have different quirks on different platforms. These inconsistencies are particularly pronounced if you are transitioning from one non-root user to another. Signal handlers and spawned processes run at the privilege of the owning process, so if a process is running as root when a signal fires or a sub-process is executed, the signal handler or sub-process will operate with root privileges.
|
::NATURE:ChildOf:CWE ID:269:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:657:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Mobile:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Installation::PHASE:Architecture and Design:NOTE:If an application has this design problem, then it can be easier for the developer to make implementation-related errors such as CWE-271 (Privilege Dropping / Lowering Errors). In addition, the consequences of Privilege Chaining (CWE-268) can become more severe.::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Application Data:IMPACT:DoS: Crash, Exit, or Restart:NOTE:An attacker will be able to gain access to any resources that are allowed by the extra privileges. Common results include executing code, disabling services, and reading restricted data.::
|
::METHOD:Manual Analysis: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.::METHOD:Black Box:DESCRIPTION:Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process and perform a login. Look for library functions and system calls that indicate when privileges are being raised or dropped. Look for accesses of resources that are restricted to normal users.::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Compare binary / bytecode to application permission manifest Cost effective for partial coverage: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteria:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host Application Interface Scanner:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Configuration Checker Permission Manifest Analysis:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) Formal Methods / Correct-By-Construction Cost effective for partial coverage: Attack Modeling:EFFECTIVENESS:High::
|
::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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:STRATEGY:Separation of Privilege:DESCRIPTION:Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.::PHASE:Architecture and Design:STRATEGY:Attack Surface Reduction:DESCRIPTION:Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.::PHASE:Implementation:DESCRIPTION:Perform extensive input validation for any privileged code that must be exposed to the user and reject anything that does not fit your strict requirements.::PHASE:Implementation:DESCRIPTION:When dropping privileges, ensure that they have been dropped successfully to avoid CWE-273. As protection mechanisms in the environment get stronger, privilege-dropping calls may fail even if it seems like they would always succeed.::PHASE:Implementation:DESCRIPTION:If circumstances force you to run with extra privileges, then determine the minimum access level necessary. First identify the different permissions that the software and its users will need to perform their actions, such as file read and write permissions, network socket permissions, and so forth. Then explicitly allow those actions while denying all else [REF-76]. Perform extensive input validation and canonicalization to minimize the chances of introducing a separate vulnerability. This mitigation is much more prone to error than dropping the privileges in the first place.::PHASE:Operation System Configuration:STRATEGY:Environment Hardening:DESCRIPTION:Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.::
|
::REFERENCE:CVE-2007-4217:DESCRIPTION:FTP client program on a certain OS runs with setuid privileges and has a buffer overflow. Most clients do not need extra privileges, so an overflow is not a vulnerability for those clients.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-4217::REFERENCE:CVE-2008-1877:DESCRIPTION:Program runs with privileges and calls another program with the same privileges, which allows read of arbitrary files.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-1877::REFERENCE:CVE-2007-5159:DESCRIPTION:OS incorrectly installs a program with setuid privileges, allowing users to gain privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-5159::REFERENCE:CVE-2008-4638:DESCRIPTION:Composite: application running with high privileges (CWE-250) allows user to specify a restricted file to process, which generates a parsing error that leaks the contents of the file (CWE-209).:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4638::REFERENCE:CVE-2008-0162:DESCRIPTION:Program does not drop privileges before calling another program, allowing code execution.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-0162::REFERENCE:CVE-2008-0368:DESCRIPTION:setuid root program allows creation of arbitrary files through command line argument.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-0368::REFERENCE:CVE-2007-3931:DESCRIPTION:Installation script installs some programs as setuid when they shouldn't be.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3931::REFERENCE:CVE-2020-3812:DESCRIPTION:mail program runs as root but does not drop its privileges before attempting to access a file. Attacker can use a symlink from their home directory to a directory only readable by root, then determine whether the file exists based on the response.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-3812::REFERENCE:CVE-2003-0908:DESCRIPTION:Product launches Help functionality while running with raised privileges, allowing command execution using Windows message to access open file dialog.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0908::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Often Misused: Privilege Management::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SER09-J:ENTRY NAME:Minimize privileges before deserializing from a privilege context::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.03.05 BR::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.03.08 BR::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.03.08 RE(1)::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.05.07 BR::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.09.02 RE(4)::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.09.03 BR::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.09.04 BR::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 1.1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 1.2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 2.1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 2.1 RE 1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SD-4::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CCSC 3::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 1.1::
|
::104::470::69::
|
::TYPE:Relationship:NOTE:There is a close association with CWE-653 (Insufficient Separation of Privileges). CWE-653 is about providing separate components for each privilege; CWE-250 is about ensuring that each component has the least amount of privileges possible.::TYPE:Maintenance:NOTE:CWE-271, CWE-272, and CWE-250 are all closely related and possibly overlapping. CWE-271 is probably better suited as a category. Both CWE-272 and CWE-250 are in active use by the community. The least privilege phrase has multiple interpretations.::TYPE:Maintenance:NOTE:The Taxonomy_Mappings to ISA/IEC 62443 were added in CWE 4.10, but they are still under review and might change in future CWE versions. These draft mappings were performed by members of the Mapping CWE to 62443 subgroup of the CWE-CAPEC ICS/OT Special Interest Group (SIG), and their work is incomplete as of CWE 4.10. The mappings are included to facilitate discussion and review by the broader ICS/OT community, and they are likely to change in future CWE versions.::
| null | 250
|
Unchecked Return Value
|
Base
|
Draft
|
The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
|
Two common programmer assumptions are this function call can never fail and it doesn't matter if this function call fails. If an attacker can force the function to fail or otherwise return a value that is not expected, then the subsequent program logic could lead to a vulnerability, because the product is not in a state that the programmer assumes. For example, if the program calls a function to drop privileges but does not check the return code to ensure that privileges were successfully dropped, then the program will continue to operate with the higher privileges.
|
::NATURE:ChildOf:CWE ID:754:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:754:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:476:VIEW ID:1000:CHAIN ID:690::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
|
::Many functions will return some value about the success of their actions. This will alert the program whether or not to handle any errors caused by that function.::
| null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:SCOPE:Integrity:IMPACT:Unexpected State:IMPACT:DoS: Crash, Exit, or Restart:NOTE:An unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation:DESCRIPTION:Check the results of all functions that return a value and verify that the value is expected.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Ensure that you account for all possible return values from the function.::PHASE:Implementation:DESCRIPTION:When designing a function, make sure you return a value or throw an exception in case of an error.::
|
::REFERENCE:CVE-2020-17533:DESCRIPTION:Chain: unchecked return value (CWE-252) of some functions for policy enforcement leads to authorization bypass (CWE-862):LINK:https://www.cve.org/CVERecord?id=CVE-2020-17533::REFERENCE:CVE-2020-6078:DESCRIPTION:Chain: The return value of a function returning a pointer is not checked for success (CWE-252) resulting in the later use of an uninitialized variable (CWE-456) and a null pointer dereference (CWE-476):LINK:https://www.cve.org/CVERecord?id=CVE-2020-6078::REFERENCE:CVE-2019-15900:DESCRIPTION:Chain: sscanf() call is used to check if a username and group exists, but the return value of sscanf() call is not checked (CWE-252), causing an uninitialized variable to be checked (CWE-457), returning success to allow authorization bypass for executing a privileged (CWE-863).:LINK:https://www.cve.org/CVERecord?id=CVE-2019-15900::REFERENCE:CVE-2007-3798:DESCRIPTION:Unchecked return value leads to resultant integer overflow and code execution.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3798::REFERENCE:CVE-2006-4447:DESCRIPTION:Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4447::REFERENCE:CVE-2006-2916:DESCRIPTION:Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2916::REFERENCE:CVE-2008-5183:DESCRIPTION:chain: unchecked return value can lead to NULL dereference:LINK:https://www.cve.org/CVERecord?id=CVE-2008-5183::REFERENCE:CVE-2010-0211:DESCRIPTION:chain: unchecked return value (CWE-252) leads to free of invalid, uninitialized pointer (CWE-824).:LINK:https://www.cve.org/CVERecord?id=CVE-2010-0211::REFERENCE:CVE-2017-6964:DESCRIPTION:Linux-based device mapper encryption program does not check the return value of setuid and setgid allowing attackers to execute code with unintended privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-6964::REFERENCE:CVE-2002-1372:DESCRIPTION:Chain: Return values of file/socket operations are not checked (CWE-252), allowing resultant consumption of file descriptors (CWE-772).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1372::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Unchecked Return Value::TAXONOMY NAME:CLASP:ENTRY NAME:Ignored function return value::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A7:ENTRY NAME:Improper Error Handling:MAPPING FIT:CWE More Specific::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ERR33-C:ENTRY NAME:Detect and handle standard library errors:MAPPING FIT:Imprecise::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS54-C:ENTRY NAME:Detect and handle POSIX library errors:MAPPING FIT:Imprecise::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:EXP00-J:ENTRY NAME:Do not ignore values returned by methods::TAXONOMY NAME:SEI CERT Perl Coding Standard:ENTRY ID:EXP32-PL:ENTRY NAME:Do not ignore function return values:MAPPING FIT:Exact::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP4:ENTRY NAME:Unchecked Status Condition::TAXONOMY NAME:OMG ASCSM:ENTRY ID:ASCSM-CWE-252-resource::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-CWE-252-data::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-CWE-252-resource::
| null | null | null | 252
|
Incorrect Check of Function Return Value
|
Base
|
Incomplete
|
The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.
|
Important and common functions will return some value about the success of its actions. This will alert the program whether or not to handle any errors caused by that function.
|
::NATURE:ChildOf:CWE ID:573:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:754:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Availability:SCOPE:Integrity:IMPACT:Unexpected State:IMPACT:DoS: Crash, Exit, or Restart:NOTE:An unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.::
| null |
::PHASE:Architecture and Design:STRATEGY:Language Selection:DESCRIPTION:Use a language or compiler that uses exceptions and requires the catching of those exceptions.::PHASE:Implementation:DESCRIPTION:Properly check all functions which return a value.::PHASE:Implementation:DESCRIPTION:When designing any function make sure you return a value or throw an exception in case of an error.::
|
::REFERENCE:CVE-2023-49286:DESCRIPTION:Chain: function in web caching proxy does not correctly check a return value (CWE-253) leading to a reachable assertion (CWE-617):LINK:https://www.cve.org/CVERecord?id=CVE-2023-49286::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Misinterpreted function return value::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP4:ENTRY NAME:Unchecked Status Condition::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:ERR33-C:ENTRY NAME:Detect and handle standard library errors:MAPPING FIT:Imprecise::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS54-C:ENTRY NAME:Detect and handle POSIX library errors:MAPPING FIT:Imprecise::
| null | null | null | 253
|
Plaintext Storage of a Password
|
Base
|
Incomplete
|
Storing a password in plaintext may result in a system compromise.
|
Password management issues occur when a password is stored in plaintext in an application's properties, configuration file, or memory. Storing a plaintext password in a configuration file allows anyone who can read the file access to the password-protected resource. In some contexts, even storage of a plaintext password in memory is considered a security risk if the password is not cleared immediately after it is used.
|
::NATURE:ChildOf:CWE ID:522:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::PHASE:Architecture and Design:NOTE:Developers sometimes believe that they cannot defend the application from someone who has access to the configuration, but this belief makes an attacker's job easier.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Avoid storing passwords in easily accessible locations.::PHASE:Architecture and Design:DESCRIPTION:Consider storing cryptographic hashes of passwords as an alternative to storing in plaintext.::PHASE::DESCRIPTION:A programmer might attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password because the encoding can be detected and decoded easily.:EFFECTIVENESS:None::
|
::REFERENCE:CVE-2022-30275:DESCRIPTION:Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30275::
| null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Password Management::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 1.5::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 1.5::
| null | null | null | 256
|
Storing Passwords in a Recoverable Format
|
Base
|
Incomplete
|
The storage of passwords in a recoverable format makes them subject to password reuse attacks by malicious users. In fact, it should be noted that recoverable encrypted passwords provide no significant benefit over plaintext passwords since they are subject not only to reuse by malicious attackers but also by malicious insiders. If a system administrator can recover a password directly, or use a brute force search on the available information, the administrator can use the password on other accounts.
| null |
::NATURE:ChildOf:CWE ID:522:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:259:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:User's passwords may be revealed.::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Revealed passwords may be reused elsewhere to impersonate the users in question.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Use strong, non-reversible encryption to protect stored passwords.::
|
::REFERENCE:CVE-2022-30018:DESCRIPTION:A messaging platform serializes all elements of User/Group objects, making private information available to adversaries:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30018::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Storing passwords in a recoverable format::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::
|
::49::
|
::TYPE:Maintenance:NOTE:The meaning of this entry needs to be investigated more closely, especially with respect to what is meant by recoverable.::
| null | 257
|
Password in Configuration File
|
Base
|
Incomplete
|
The product stores a password in a configuration file that might be accessible to actors who do not know the password.
|
This can result in compromise of the system for which the password is used. An attacker could gain access to this file and learn the stored password or worse yet, change the password to one of their choosing.
|
::NATURE:ChildOf:CWE ID:522:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Avoid storing passwords in easily accessible locations.::PHASE:Architecture and Design:DESCRIPTION:Consider storing cryptographic hashes of passwords as an alternative to storing in plaintext.::
|
::REFERENCE:CVE-2022-38665:DESCRIPTION:A continuous delivery pipeline management tool stores an unencypted password in a configuration file.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-38665::
| null |
::File or Directory::
|
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Password Management: Password in Configuration File::
| null | null | null | 260
|
Weak Encoding for Password
|
Base
|
Incomplete
|
Obscuring a password with a trivial encoding does not protect the password.
|
Password management issues occur when a password is stored in plaintext in an application's properties or configuration file. A programmer can attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password.
|
::NATURE:ChildOf:CWE ID:522:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE::DESCRIPTION:Passwords should be encrypted with keys that are at least 128 bits in length for adequate security.::
| null | null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Password Management: Weak Cryptography::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A8:ENTRY NAME:Insecure Storage:MAPPING FIT:CWE More Specific::
|
::55::
|
::TYPE:Other:NOTE:The crypt family of functions uses weak cryptographic algorithms and should be avoided. It may be present in some projects for compatibility.::
| null | 261
|
Not Using Password Aging
|
Base
|
Draft
|
The product does not have a mechanism in place for managing password aging.
|
Password aging (or password rotation) is a policy that forces users to change their passwords after a defined time period passes, such as every 30 or 90 days. Without mechanisms such as aging, users might not change their passwords in a timely manner. Note that while password aging was once considered an important security feature, it has since fallen out of favor by many, because it is not as effective against modern threats compared to other mechanisms such as slow hashes. In addition, forcing frequent changes can unintentionally encourage users to select less-secure passwords. However, password aging is still in use due to factors such as compliance requirements, e.g., Payment Card Industry Data Security Standard (PCI DSS).
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:309:VIEW ID:1000::NATURE:PeerOf:CWE ID:324:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:As passwords age, the probability that they are compromised grows.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:As part of a product's design, require users to change their passwords regularly and avoid reusing previous passwords.::PHASE:Implementation:DESCRIPTION:Developers might disable clipboard paste operations into password fields as a way to discourage users from pasting a password into a clipboard. However, this might encourage users to choose less-secure passwords that are easier to type, and it can reduce the usability of password managers [REF-1294].:EFFECTIVENESS:Discouraged Common Practice::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Not allowing password aging::
|
::16::49::509::55::555::560::561::565::600::652::653::70::
| null | null | 262
|
Password Aging with Long Expiration
|
Base
|
Draft
|
The product supports password aging, but the expiration period is too long.
|
Password aging (or password rotation) is a policy that forces users to change their passwords after a defined time period passes, such as every 30 or 90 days. A long expiration provides more time for attackers to conduct password cracking before users are forced to change to a new password. Note that while password aging was once considered an important security feature, it has since fallen out of favor by many, because it is not as effective against modern threats compared to other mechanisms such as slow hashes. In addition, forcing frequent changes can unintentionally encourage users to select less-secure passwords. However, password aging is still in use due to factors such as compliance requirements, e.g., Payment Card Industry Data Security Standard (PCI DSS).
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:As passwords age, the probability that they are compromised grows.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Ensure that password aging is limited so that there is a defined maximum age for passwords. Note that if the expiration window is too short, it can cause users to generate poor or predictable passwords.::PHASE:Architecture and Design:DESCRIPTION:Ensure that the user is notified several times leading up to the password expiration.::PHASE:Architecture and Design:DESCRIPTION:Create mechanisms to prevent users from reusing passwords or creating similar passwords.::PHASE:Implementation:DESCRIPTION:Developers might disable clipboard paste operations into password fields as a way to discourage users from pasting a password into a clipboard. However, this might encourage users to choose less-secure passwords that are easier to type, and it can reduce the usability of password managers [REF-1294].:EFFECTIVENESS:Discouraged Common Practice::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Allowing password aging::
|
::16::49::509::55::555::560::561::565::600::652::653::70::
| null | null | 263
|
Incorrect Privilege Assignment
|
Base
|
Draft
|
A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
| null |
::NATURE:ChildOf:CWE ID:269:VIEW ID:1000:ORDINAL:Primary::NATURE:CanAlsoBe:CWE ID:286:VIEW ID:1000::
|
::ORDINALITY:Resultant::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:A user can access restricted functionality and/or sensitive information that may include administrative functionality and user accounts.::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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.::
|
::REFERENCE:CVE-1999-1193:DESCRIPTION:untrusted user placed in unix wheel group:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1193::REFERENCE:CVE-2005-2741:DESCRIPTION:Product allows users to grant themselves certain rights that can be used to escalate privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2741::REFERENCE:CVE-2005-2496:DESCRIPTION:Product uses group ID of a user instead of the group, causing it to run with different privileges. This is resultant from some other unknown issue.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2496::REFERENCE:CVE-2004-0274:DESCRIPTION:Product mistakenly assigns a particular status to an entity, leading to increased privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0274::
| null |
::System Process::
|
::TAXONOMY NAME:PLOVER:ENTRY NAME:Incorrect Privilege Assignment::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SEC00-J:ENTRY NAME:Do not allow privileged blocks to leak sensitive information across a trust boundary::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SEC01-J:ENTRY NAME:Do not allow tainted variables in privileged blocks::
| null | null | null | 266
|
Privilege Defined With Unsafe Actions
|
Base
|
Incomplete
|
A particular privilege, role, capability, or right can be used to perform unsafe actions that were not intended, even when it is assigned to the correct entity.
| null |
::NATURE:ChildOf:CWE ID:269:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:A user can access restricted functionality and/or sensitive information that may include administrative functionality and user accounts.::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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.::
|
::REFERENCE:CVE-2002-1981:DESCRIPTION:Roles have access to dangerous procedures (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1981::REFERENCE:CVE-2002-1671:DESCRIPTION:Untrusted object/method gets access to clipboard (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1671::REFERENCE:CVE-2004-2204:DESCRIPTION:Gain privileges using functions/tags that should be restricted (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2204::REFERENCE:CVE-2000-0315:DESCRIPTION:Traceroute program allows unprivileged users to modify source address of packet (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0315::REFERENCE:CVE-2004-0380:DESCRIPTION:Bypass domain restrictions using a particular file that references unsafe URI schemes (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0380::REFERENCE:CVE-2002-1154:DESCRIPTION:Script does not restrict access to an update command, leading to resultant disk consumption and filled error logs (Accessible entities).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1154::REFERENCE:CVE-2002-1145:DESCRIPTION:public database user can use stored procedure to modify data controlled by the database owner (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1145::REFERENCE:CVE-2000-0506:DESCRIPTION:User with capability can prevent setuid program from dropping privileges (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0506::REFERENCE:CVE-2002-2042:DESCRIPTION:Allows attachment to and modification of privileged processes (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2042::REFERENCE:CVE-2000-1212:DESCRIPTION:User with privilege can edit raw underlying object using unprotected method (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2000-1212::REFERENCE:CVE-2005-1742:DESCRIPTION:Inappropriate actions allowed by a particular role(Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1742::REFERENCE:CVE-2001-1480:DESCRIPTION:Untrusted entity allowed to access the system clipboard (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1480::REFERENCE:CVE-2001-1551:DESCRIPTION:Extra Linux capability allows bypass of system-specified restriction (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1551::REFERENCE:CVE-2001-1166:DESCRIPTION:User with debugging rights can read entire process (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1166::REFERENCE:CVE-2005-1816:DESCRIPTION:Non-root admins can add themselves or others to the root admin group (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1816::REFERENCE:CVE-2005-2173:DESCRIPTION:Users can change certain properties of objects to perform otherwise unauthorized actions (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2173::REFERENCE:CVE-2005-2027:DESCRIPTION:Certain debugging commands not restricted to just the administrator, allowing registry modification and infoleak (Unsafe privileged actions).:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2027::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Unsafe Privilege::
|
::58::634::637::643::648::
|
::TYPE:Maintenance:NOTE:Note: there are 2 separate sub-categories here: - privilege incorrectly allows entities to perform certain actions - object is incorrectly accessible to entities with a given privilege::
| null | 267
|
Privilege Chaining
|
Base
|
Draft
|
Two distinct privileges, roles, capabilities, or rights can be combined in a way that allows an entity to perform unsafe actions that would not be allowed without that combination.
| null |
::NATURE:ChildOf:CWE ID:269:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:A user can be given or gain access rights of another user. This can give the user unauthorized access to sensitive information including the access information of another user.::
| null |
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege:DESCRIPTION:Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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.::
|
::REFERENCE:CVE-2005-1736:DESCRIPTION:Chaining of user rights.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1736::REFERENCE:CVE-2002-1772:DESCRIPTION:Gain certain rights via privilege chaining in alternate channel.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1772::REFERENCE:CVE-2005-1973:DESCRIPTION:Application is allowed to assign extra permissions to itself.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1973::REFERENCE:CVE-2003-0640:DESCRIPTION:operator user can overwrite usernames and passwords to gain admin privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0640::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Privilege Chaining::
| null |
::TYPE:Relationship:NOTE:There is some conceptual overlap with Unsafe Privilege.::
| null | 268
|
Privilege Context Switching Error
|
Base
|
Draft
|
The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.
| null |
::NATURE:ChildOf:CWE ID:269:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:A user can assume the identity of another user with separate privileges in another context. This will give the user unauthorized access that may allow them to acquire the access information of other users.::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design Operation:STRATEGY:Environment Hardening: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:STRATEGY:Separation of Privilege:DESCRIPTION:Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.::
|
::REFERENCE:CVE-2002-1688:DESCRIPTION:Web browser cross domain problem when user hits back button.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1688::REFERENCE:CVE-2003-1026:DESCRIPTION:Web browser cross domain problem when user hits back button.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1026::REFERENCE:CVE-2002-1770:DESCRIPTION:Cross-domain issue - third party product passes code to web browser, which executes it in unsafe zone.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1770::REFERENCE:CVE-2005-2263:DESCRIPTION:Run callback in different security context after it has been changed from untrusted to trusted. * note that context switch before actions are completed is one type of problem that happens frequently, espec. in browsers.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2263::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Privilege Context Switching Error::
|
::17::30::35::
|
::TYPE:Research Gap:NOTE:This concept needs more study.::
| null | 270
|
Least Privilege Violation
|
Base
|
Incomplete
|
The elevated privilege level required to perform operations such as chroot() should be dropped immediately after the operation is performed.
| null |
::NATURE:ChildOf:CWE ID:271:VIEW ID:1000:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Access Control:SCOPE:Confidentiality:IMPACT:Gain Privileges or Assume Identity:IMPACT:Read Application Data:IMPACT:Read Files or Directories:NOTE:An attacker may be able to access resources with the elevated privilege that could not be accessed with the attacker's original privileges. This is particularly likely in conjunction with another flaw, such as a buffer overflow.::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Compare binary / bytecode to application permission manifest:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteria:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Permission Manifest Analysis:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) Formal Methods / Correct-By-Construction Cost effective for partial coverage: Attack Modeling:EFFECTIVENESS:High::
|
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege:DESCRIPTION:Follow the principle of least privilege when assigning access rights to entities in a software system.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
| null | null | null |
::TAXONOMY NAME:7 Pernicious Kingdoms:ENTRY NAME:Least Privilege Violation::TAXONOMY NAME:CLASP:ENTRY NAME:Failure to drop privileges when reasonable::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS02-C:ENTRY NAME:Follow the principle of least privilege::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SEC00-J:ENTRY NAME:Do not allow privileged blocks to leak sensitive information across a trust boundary::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SEC01-J:ENTRY NAME:Do not allow tainted variables in privileged blocks::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP36:ENTRY NAME:Privilege::
|
::17::35::76::
|
::TYPE:Maintenance:NOTE:CWE-271, CWE-272, and CWE-250 are all closely related and possibly overlapping. CWE-271 is probably better suited as a category.::TYPE:Other:NOTE:If system privileges are not dropped when it is reasonable to do so, this is not a vulnerability by itself. According to the principle of least privilege, access should be allowed only when it is absolutely necessary to the function of a given system, and only for the minimal necessary amount of time. Any further allowance of privilege widens the window of time during which a successful exploitation of the system will provide an attacker with that same privilege. If at all possible, limit the allowance of system privilege to small, simple sections of code that may be called atomically. When a program calls a privileged function, such as chroot(), it must first acquire root privilege. As soon as the privileged operation has completed, the program should drop root privilege and return to the privilege level of the invoking user.::
| null | 272
|
Improper Check for Dropped Privileges
|
Base
|
Incomplete
|
The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.
|
If the drop fails, the product will continue to run with the raised privileges, which might provide additional access to unprivileged users.
|
::NATURE:ChildOf:CWE ID:754:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:754:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:271:VIEW ID:1000::NATURE:PeerOf:CWE ID:252:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
|
::In Windows based environments that have access control, impersonation is used so that access checks can be performed on a client identity by a server with higher privileges. By impersonating the client, the server is restricted to client-level security -- although in different threads it may have much higher privileges.::
| null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic. This issue is likely to occur in restrictive environments in which the operating system or application provides fine-grained control over privilege management.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:If privileges are not dropped, neither are access rights of the user. Often these rights can be prevented from being dropped.::SCOPE:Access Control:SCOPE:Non-Repudiation:IMPACT:Gain Privileges or Assume Identity:IMPACT:Hide Activities:NOTE:If privileges are not dropped, in some cases the system may record actions as the user which is being impersonated rather than the impersonator.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::PHASE:Implementation:DESCRIPTION:Check the results of all functions that return a value and verify that the value is expected.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:In Windows, make sure that the process token has the SeImpersonatePrivilege(Microsoft Server 2003). Code that relies on impersonation for security must ensure that the impersonation succeeded, i.e., that a proper privilege demotion happened.::
|
::REFERENCE:CVE-2006-4447:DESCRIPTION:Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4447::REFERENCE:CVE-2006-2916:DESCRIPTION:Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-2916::
| null |
::System Process::
|
::TAXONOMY NAME:CLASP:ENTRY NAME:Failure to check whether privileges were dropped successfully::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:POS37-C:ENTRY NAME:Ensure that privilege relinquishment is successful:MAPPING FIT:Exact::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP4:ENTRY NAME:Unchecked Status Condition::
| null | null | null | 273
|
Improper Handling of Insufficient Privileges
|
Base
|
Draft
|
The product does not handle or incorrectly handles when it has insufficient privileges to perform an operation, leading to resultant weaknesses.
| null |
::NATURE:ChildOf:CWE ID:755:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:269:VIEW ID:1000::NATURE:PeerOf:CWE ID:271:VIEW ID:1000::NATURE:CanAlsoBe:CWE ID:280:VIEW ID:1000::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Other:IMPACT:Other:IMPACT:Alter Execution Logic::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
| null |
::REFERENCE:CVE-2001-1564:DESCRIPTION:System limits are not properly enforced after privileges are dropped.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1564::REFERENCE:CVE-2005-3286:DESCRIPTION:Firewall crashes when it can't read a critical memory block that was protected by a malicious process.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3286::REFERENCE:CVE-2005-1641:DESCRIPTION:Does not give admin sufficient privileges to overcome otherwise legitimate user actions.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1641::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Insufficient privileges::
| null |
::TYPE:Maintenance:NOTE:CWE-280 and CWE-274 are too similar. It is likely that CWE-274 will be deprecated in the future.::TYPE:Relationship:NOTE:Overlaps dropped privileges, insufficient permissions.::TYPE:Theoretical:NOTE:This has a layering relationship with Unchecked Error Condition and Unchecked Return Value.::TYPE:Theoretical:NOTE:Within the context of vulnerability theory, privileges and permissions are two sides of the same coin. Privileges are associated with actors, and permissions are associated with resources. To perform access control, at some point the product makes a decision about whether the actor (and the privileges that have been assigned to that actor) is allowed to access the resource (based on the permissions that have been specified for that resource).::
| null | 274
|
Incorrect Default Permissions
|
Base
|
Draft
|
During installation, installed file permissions are set to allow anyone to modify those files.
| null |
::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:732:VIEW ID:1003:ORDINAL:Primary::
|
::ORDINALITY:Primary::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation::PHASE:Installation::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Inter-application Flow Analysis:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteria Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Host Application Interface Scanner Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer Automated Monitored Execution Forced Path Execution:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Source Code: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:EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Configuration Checker:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design Operation:DESCRIPTION:The architecture needs to access and modification attributes for files to only those users who actually require those actions.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2005-1941:DESCRIPTION:Executables installed world-writable.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1941::REFERENCE:CVE-2002-1713:DESCRIPTION:Home directories installed world-readable.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1713::REFERENCE:CVE-2001-1550:DESCRIPTION:World-writable log files allow information loss; world-readable file has cleartext passwords.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1550::REFERENCE:CVE-2002-1711:DESCRIPTION:World-readable directory.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1711::REFERENCE:CVE-2002-1844:DESCRIPTION:Windows product uses insecure permissions when installing on Solaris (genesis: port error).:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1844::REFERENCE:CVE-2001-0497:DESCRIPTION:Insecure permissions for a shared secret key file. Overlaps cryptographic problem.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0497::REFERENCE:CVE-1999-0426:DESCRIPTION:Default permissions of a device allow IP spoofing.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0426::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Insecure Default Permissions::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO06-C:ENTRY NAME:Create files with appropriate access permissions::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:FIO01-J:ENTRY NAME:Create files with appropriate access permission::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 2-4:ENTRY NAME:Req SP.03.08::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 2.1::
|
::1::127::81::
| null | null | 276
|
Insecure Inherited Permissions
|
Variant
|
Draft
|
A product defines a set of insecure permissions that are inherited by objects that are created by the program.
| null |
::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2005-1841:DESCRIPTION:User's umask is used when creating temp files.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1841::REFERENCE:CVE-2002-1786:DESCRIPTION:Insecure umask for core dumps [is the umask preserved or assigned?].:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1786::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Insecure inherited permissions::
| null | null | null | 277
|
Insecure Preserved Inherited Permissions
|
Variant
|
Incomplete
|
A product inherits a set of insecure permissions for an object, e.g. when copying from an archive file, without user awareness or involvement.
| null |
::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2005-1724:DESCRIPTION:Does not obey specified permissions when exporting.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1724::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Insecure preserved inherited permissions::
| null | null | null | 278
|
Incorrect Execution-Assigned Permissions
|
Variant
|
Draft
|
While it is executing, the product sets the permissions of an object in a way that violates the intended permissions that have been specified by the user.
| null |
::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Architecture and Design::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::
|
::REFERENCE:CVE-2002-0265:DESCRIPTION:Log files opened read/write.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0265::REFERENCE:CVE-2003-0876:DESCRIPTION:Log files opened read/write.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0876::REFERENCE:CVE-2002-1694:DESCRIPTION:Log files opened read/write.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1694::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Insecure execution-assigned permissions::TAXONOMY NAME:CERT C Secure Coding:ENTRY ID:FIO06-C:ENTRY NAME:Create files with appropriate access permissions::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:FIO01-J:ENTRY NAME:Create files with appropriate access permission::
|
::81::
| null | null | 279
|
Improper Handling of Insufficient Permissions or Privileges
|
Base
|
Draft
|
The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected code paths that may leave the product in an invalid state.
| null |
::NATURE:ChildOf:CWE ID:755:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Other:IMPACT:Other:IMPACT:Alter Execution Logic::
| null |
::PHASE:Architecture and Design:STRATEGY:Separation of Privilege: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 the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.::PHASE:Implementation:DESCRIPTION:Always check to see if you have successfully accessed a resource or system functionality, and use proper error handling if it is unsuccessful. Do this even when you are operating in a highly privileged mode, because errors or environmental conditions might still cause a failure. For example, environments with highly granular permissions/privilege models, such as Windows or Linux capabilities, can cause unexpected failures.::
|
::REFERENCE:CVE-2003-0501:DESCRIPTION:Special file system allows attackers to prevent ownership/permission change of certain entries by opening the entries before calling a setuid program.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0501::REFERENCE:CVE-2004-0148:DESCRIPTION:FTP server places a user in the root directory when the user's permissions prevent access to the their own home directory.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0148::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Fails poorly due to insufficient permissions::TAXONOMY NAME:WASC:ENTRY ID:17:ENTRY NAME:Improper Filesystem Permissions::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP4:ENTRY NAME:Unchecked Status Condition::
| null |
::TYPE:Maintenance:NOTE:CWE-280 and CWE-274 are too similar. It is likely that CWE-274 will be deprecated in the future.::TYPE:Relationship:NOTE:This can be both primary and resultant. When primary, it can expose a variety of weaknesses because a resource might not have the expected state, and subsequent operations might fail. It is often resultant from Unchecked Error Condition (CWE-391).::TYPE:Theoretical:NOTE:Within the context of vulnerability theory, privileges and permissions are two sides of the same coin. Privileges are associated with actors, and permissions are associated with resources. To perform access control, at some point the software makes a decision about whether the actor (and the privileges that have been assigned to that actor) is allowed to access the resource (based on the permissions that have been specified for that resource).::TYPE:Research Gap:NOTE:This type of issue is under-studied, since researchers often concentrate on whether an object has too many permissions, instead of not enough. These weaknesses are likely to appear in environments with fine-grained models for permissions and privileges, which can include operating systems and other large-scale software packages. However, even highly simplistic permission/privilege models are likely to contain these issues if the developer has not considered the possibility of access failure.::
| null | 280
|
Improper Preservation of Permissions
|
Base
|
Draft
|
The product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended.
| null |
::NATURE:ChildOf:CWE ID:732:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:732:VIEW ID:1003:ORDINAL:Primary::
|
::ORDINALITY:Resultant:DESCRIPTION:This is resultant from errors that prevent the permissions from being preserved.::
|
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Operation::
| null | null |
::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::
| null | null |
::REFERENCE:CVE-2002-2323:DESCRIPTION:Incorrect ACLs used when restoring backups from directories that use symbolic links.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-2323::REFERENCE:CVE-2001-1515:DESCRIPTION:Automatic modification of permissions inherited from another file system.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1515::REFERENCE:CVE-2005-1920:DESCRIPTION:Permissions on backup file are created with defaults, possibly less secure than original file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1920::REFERENCE:CVE-2001-0195:DESCRIPTION:File is made world-readable when being cloned.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0195::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Permission preservation failure::
| null | null | null | 281
|
Unverified Ownership
|
Base
|
Draft
|
The product does not properly verify that a critical resource is owned by the proper entity.
| null |
::NATURE:ChildOf:CWE ID:282:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker could gain unauthorized access to system resources.::
| null |
::PHASE:Architecture and Design Operation:DESCRIPTION:Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.::PHASE:Architecture and Design:STRATEGY:Separation of Privilege:DESCRIPTION:Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.::
|
::REFERENCE:CVE-2001-0178:DESCRIPTION:Program does not verify the owner of a UNIX socket that is used for sending a password.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0178::REFERENCE:CVE-2004-2012:DESCRIPTION:Owner of special device not checked, allowing root.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2012::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Unverified Ownership::
| null |
::TYPE:Relationship:NOTE:This overlaps insufficient comparison, verification errors, permissions, and privileges.::
| null | 283
|
Authentication Bypass by Alternate Name
|
Base
|
Incomplete
|
The product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource or actor.
| null |
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
| null |
::PHASE:Architecture and Design:STRATEGY:Input Validation:DESCRIPTION:Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list 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. This 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.::PHASE:Implementation:STRATEGY:Input Validation: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 allowlist validation schemes by introducing dangerous inputs after they have been checked.::
|
::REFERENCE:CVE-2003-0317:DESCRIPTION:Protection mechanism that restricts URL access can be bypassed using URL encoding.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0317::REFERENCE:CVE-2004-0847:DESCRIPTION:Bypass of authentication for files using (backslash) or %5C (encoded backslash).:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0847::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Authentication bypass by alternate name::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:IDS01-J:ENTRY NAME:Normalize strings before validating them:MAPPING FIT:CWE More Specific::TAXONOMY NAME:SEI CERT Oracle Coding Standard for Java:ENTRY ID:IDS01-J:ENTRY NAME:Normalize strings before validating them:MAPPING FIT:CWE More Specific::
| null |
::TYPE:Relationship:NOTE:Overlaps equivalent encodings, canonicalization, authorization, multiple trailing slash, trailing space, mixed case, and other equivalence issues.::TYPE:Theoretical:NOTE:Alternate names are useful in data driven manipulation attacks, not just for authentication.::
| null | 289
|
Authentication Bypass by Spoofing
|
Base
|
Incomplete
|
This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.
| null |
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:287:VIEW ID:1003:ORDINAL:Primary::
| null | null | null | null |
::PHASE:Implementation::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:This weakness can allow an attacker to access resources which are not otherwise accessible without proper authentication.::
| null | null |
::REFERENCE:CVE-2022-30319:DESCRIPTION:S-bus functionality in a home automation product performs access control using an IP allowlist, which can be bypassed by a forged IP address.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30319::REFERENCE:CVE-2009-1048:DESCRIPTION:VOIP product allows authentication bypass using 127.0.0.1 in the Host header.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-1048::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Authentication bypass by spoofing::
|
::21::22::459::461::473::476::59::60::667::94::
|
::TYPE:Relationship:NOTE:This can be resultant from insufficient verification.::
| null | 290
|
Authentication Bypass by Capture-replay
|
Base
|
Incomplete
|
A capture-replay flaw exists when the design of the product makes it possible for a malicious user to sniff network traffic and bypass authentication by replaying it to the server in question to the same effect as the original message (or with minor changes).
|
Capture-replay attacks are common and can be difficult to defeat without cryptography. They are a subset of network injection attacks that rely on observing previously-sent valid commands, then changing them slightly if necessary and resending the same commands to the server.
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:287:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Messages sent with a capture-relay attack allow access to resources which are not otherwise accessible without proper authentication.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Utilize some sequence or time stamping functionality along with a checksum which takes this into account in order to ensure that messages can be parsed only once.::PHASE:Architecture and Design:DESCRIPTION:Since any attacker who can listen to traffic can see sequence numbers, it is necessary to sign messages with some kind of cryptography to ensure that sequence numbers are not simply doctored along with content.::
|
::REFERENCE:CVE-2005-3435:DESCRIPTION:product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3435::REFERENCE:CVE-2007-4961:DESCRIPTION:Chain: cleartext transmission of the MD5 hash of password (CWE-319) enables attacks against a server that is susceptible to replay (CWE-294).:LINK:https://www.cve.org/CVERecord?id=CVE-2007-4961::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Authentication bypass by replay::TAXONOMY NAME:CLASP:ENTRY NAME:Capture-replay::
|
::102::509::555::561::60::644::645::652::701::94::
| null | null | 294
|
Improper Certificate Validation
|
Base
|
Draft
|
The product does not validate, or incorrectly validates, a certificate.
|
When a certificate is invalid or malicious, it might allow an attacker to spoof a trusted entity by interfering in the communication path between the host and client. The product might connect to a malicious host while believing it is a trusted host, or the product might be deceived into accepting spoofed data that appears to originate from a trusted host.
|
::NATURE:ChildOf:CWE ID:287:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:287:VIEW ID:1003:ORDINAL:Primary::NATURE:PeerOf:CWE ID:322:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Mobile:TECHNOLOGY PREVALENCE:Undetermined::
|
::A certificate is a token that associates an identity (principal) to a cryptographic key. Certificates can be used to check if a public key belongs to the assumed owner.::
| null |
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::PHASE:Implementation:NOTE:When the product uses certificate pinning, the developer might not properly validate all relevant components of the certificate before pinning the certificate. This can make it difficult or expensive to test after the pinning is complete.::
| null | null |
::SCOPE:Integrity:SCOPE:Authentication:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity::
|
::METHOD:Automated Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Man-in-the-middle attack tool:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design Implementation:DESCRIPTION:Certificates should be carefully managed and checked to assure that data are encrypted with the intended owner's public key.::PHASE:Implementation:DESCRIPTION:If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.::
|
::REFERENCE:CVE-2019-12496:DESCRIPTION:A Go framework for robotics, drones, and IoT devices skips verification of root CA certificates by default.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-12496::REFERENCE:CVE-2014-1266:DESCRIPTION:chain: incorrect goto in Apple SSL product bypasses certificate validation, allowing Adversary-in-the-Middle (AITM) attack (Apple goto fail bug). CWE-705 (Incorrect Control Flow Scoping) -> CWE-561 (Dead Code) -> CWE-295 (Improper Certificate Validation) -> CWE-393 (Return of Wrong Status Code) -> CWE-300 (Channel Accessible by Non-Endpoint).:LINK:https://www.cve.org/CVERecord?id=CVE-2014-1266::REFERENCE:CVE-2021-22909:DESCRIPTION:Chain: router's firmware update procedure uses curl with -k (insecure) option that disables certificate validation (CWE-295), allowing adversary-in-the-middle (AITM) compromise with a malicious firmware image (CWE-494).:LINK:https://www.cve.org/CVERecord?id=CVE-2021-22909::REFERENCE:CVE-2008-4989:DESCRIPTION:Verification function trusts certificate chains in which the last certificate is self-signed.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4989::REFERENCE:CVE-2012-5821:DESCRIPTION:Web browser uses a TLS-related function incorrectly, preventing it from verifying that a server's certificate is signed by a trusted certification authority (CA):LINK:https://www.cve.org/CVERecord?id=CVE-2012-5821::REFERENCE:CVE-2009-3046:DESCRIPTION:Web browser does not check if any intermediate certificates are revoked.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-3046::REFERENCE:CVE-2011-0199:DESCRIPTION:Operating system does not check Certificate Revocation List (CRL) in some cases, allowing spoofing using a revoked certificate.:LINK:https://www.cve.org/CVERecord?id=CVE-2011-0199::REFERENCE:CVE-2012-5810:DESCRIPTION:Mobile banking application does not verify hostname, leading to financial loss.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-5810::REFERENCE:CVE-2012-3446:DESCRIPTION:Cloud-support library written in Python uses incorrect regular expression when matching hostname.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-3446::REFERENCE:CVE-2009-2408:DESCRIPTION:Web browser does not correctly handle '0' character (NUL) in Common Name, allowing spoofing of https sites.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-2408::REFERENCE:CVE-2012-2993:DESCRIPTION:Smartphone device does not verify hostname, allowing spoofing of mail services.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-2993::REFERENCE:CVE-2012-5822:DESCRIPTION:Application uses third-party library that does not validate hostname.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-5822::REFERENCE:CVE-2012-5819:DESCRIPTION:Cloud storage management application does not validate hostname.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-5819::REFERENCE:CVE-2012-5817:DESCRIPTION:Java library uses JSSE SSLSocket and SSLEngine classes, which do not verify the hostname.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-5817::REFERENCE:CVE-2010-1378:DESCRIPTION:chain: incorrect calculation allows attackers to bypass certificate checks.:LINK:https://www.cve.org/CVERecord?id=CVE-2010-1378::REFERENCE:CVE-2005-3170:DESCRIPTION:LDAP client accepts certificates even if they are not from a trusted CA.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3170::REFERENCE:CVE-2009-0265:DESCRIPTION:chain: DNS server does not correctly check return value from the OpenSSL EVP_VerifyFinal function allows bypass of validation of the certificate chain.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-0265::REFERENCE:CVE-2003-1229:DESCRIPTION:chain: product checks if client is trusted when it intended to check if the server is trusted, allowing validation of signed code.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1229::REFERENCE:CVE-2002-0862:DESCRIPTION:Cryptographic API, as used in web browsers, mail clients, and other software, does not properly validate Basic Constraints.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0862::REFERENCE:CVE-2009-1358:DESCRIPTION:chain: OS package manager does not check properly check the return value, allowing bypass using a revoked certificate.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-1358::
| null | null |
::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A10:ENTRY NAME:Insecure Configuration Management:MAPPING FIT:CWE More Specific::
|
::459::475::
| null | null | 295
|
Reflection Attack in an Authentication Protocol
|
Base
|
Draft
|
Simple authentication protocols are subject to reflection attacks if a malicious user can use the target machine to impersonate a trusted user.
|
A mutual authentication protocol requires each party to respond to a random challenge by the other party by encrypting it with a pre-shared key. Often, however, such protocols employ the same pre-shared key for communication with a number of different entities. A malicious user or an attacker can easily compromise this protocol without possessing the correct key by employing a reflection attack on the protocol. Reflection attacks capitalize on mutual authentication schemes in order to trick the target into revealing the secret shared between it and another valid user. In a basic mutual-authentication scheme, a secret is known to both the valid user and the server; this allows them to authenticate. In order that they may verify this shared secret without sending it plainly over the wire, they utilize a Diffie-Hellman-style scheme in which they each pick a value, then request the hash of that value as keyed by the shared secret. In a reflection attack, the attacker claims to be a valid user and requests the hash of a random value from the server. When the server returns this value and requests its own value to be hashed, the attacker opens another connection to the server. This time, the hash requested by the attacker is the value which the server requested in the first connection. When the server returns this hashed value, it is used in the first connection, authenticating the attacker successfully as the impersonated valid user.
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:327:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:The primary result of reflection attacks is successful authentication with a target machine -- as an impersonated user.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Use different keys for the initiator and responder or of a different type of challenge for the initiator and responder.::PHASE:Architecture and Design:DESCRIPTION:Let the initiator prove its identity before proceeding.::
|
::REFERENCE:CVE-2005-3435:DESCRIPTION:product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3435::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Reflection attack in an auth protocol::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A7:ENTRY NAME:Broken Authentication and Session Management:MAPPING FIT:CWE More Specific::
|
::90::
|
::TYPE:Maintenance:NOTE:The term reflection is used in multiple ways within CWE and the community, so its usage should be reviewed.::
| null | 301
|
Incorrect Implementation of Authentication Algorithm
|
Base
|
Draft
|
The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect.
|
This incorrect implementation may allow authentication to be bypassed.
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
| null | null |
::REFERENCE:CVE-2003-0750:DESCRIPTION:Conditional should have been an 'or' not an 'and'.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0750::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Authentication Logic Error::
|
::90::
| null | null | 303
|
Authentication Bypass by Primary Weakness
|
Base
|
Draft
|
The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.
| null |
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
| null | null |
::REFERENCE:CVE-2002-1374:DESCRIPTION:The provided password is only compared against the first character of the real password.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1374::REFERENCE:CVE-2000-0979:DESCRIPTION:The password is not properly checked, which allows remote attackers to bypass access controls by sending a 1-byte password that matches the first character of the real password.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0979::REFERENCE:CVE-2001-0088:DESCRIPTION:Chain: Forum software does not properly initialize an array, which inadvertently sets the password to a single character, allowing remote attackers to easily guess the password and gain administrative privileges.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0088::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Authentication Bypass by Primary Weakness::
| null |
::TYPE:Relationship:NOTE:Most authentication bypass errors are resultant, not primary.::
| null | 305
|
Missing Authentication for Critical Function
|
Base
|
Draft
|
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
|
As data is migrated to the cloud, if access does not require authentication, it can be easier for attackers to access the data from anywhere on the Internet.
|
::NATURE:ChildOf:CWE ID:287:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:287:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Cloud Computing:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Often::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::
| null | null |
::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Other:NOTE:Exposing critical functionality essentially provides an attacker with the privilege level of that functionality. The consequences will depend on the associated functionality, but they can range from reading or modifying sensitive data, access to administrative or other privileged functionality, or possibly even execution of arbitrary code.::
|
::METHOD:Manual Analysis: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 custom authentication mechanisms.::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis is useful for detecting commonly-used idioms for authentication. A tool may be able to analyze related configuration files, such as .htaccess in Apache web servers, or detect the usage of commonly-used authentication libraries. Generally, automated static analysis tools have difficulty detecting custom authentication schemes. In addition, the software's design may include some functionality that is accessible to any user and does not require an established identity; an automated technique that detects the absence of authentication may report false positives.:EFFECTIVENESS:Limited::METHOD:Manual Static Analysis - Binary or Bytecode: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:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host Application Interface Scanner Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code: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):EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) Formal Methods / Correct-By-Construction Cost effective for partial coverage: Attack Modeling:EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Divide the software into anonymous, normal, privileged, and administrative areas. Identify which of these areas require a proven user identity, and use a centralized authentication capability. Identify all potential communication channels, or other means of interaction with the software, to ensure that all channels are appropriately protected. Developers sometimes perform authentication at the primary channel, but open up a secondary channel that is assumed to be private. For example, a login mechanism may be listening on one network port, but after successful authentication, it may open up a second port where it waits for the connection, but avoids authentication because it assumes that only the authenticated party will connect to the port. In general, if the software or protocol allows a single session or user state to persist across multiple connections or channels, authentication and appropriate credential management need to be used throughout.::PHASE:Architecture and Design: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:Architecture and Design:DESCRIPTION:Where possible, avoid implementing custom authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These may make it easier to provide a clear separation between authentication tasks and authorization tasks. In environments such as the World Wide Web, the line between authentication and authorization is sometimes blurred. If custom authentication routines are required instead of those provided by the server, then these routines must be applied to every single page, since these pages could be requested directly.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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 libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator [REF-45].::PHASE:Implementation System Configuration Operation:DESCRIPTION:When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to require strong authentication for users who should be allowed to access the data [REF-1297] [REF-1298] [REF-1302].::
|
::REFERENCE:CVE-2022-31260:DESCRIPTION:Chain: a digital asset management program has an undisclosed backdoor in the legacy version of a PHP script (CWE-912) that could allow an unauthenticated user to export metadata (CWE-306):LINK:https://www.cve.org/CVERecord?id=CVE-2022-31260::REFERENCE:CVE-2022-29951:DESCRIPTION:TCP-based protocol in Programmable Logic Controller (PLC) has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29951::REFERENCE:CVE-2022-29952:DESCRIPTION:Condition Monitor firmware uses a protocol that does not require authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29952::REFERENCE:CVE-2022-30276:DESCRIPTION:SCADA-based protocol for bridging WAN and LAN traffic has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30276::REFERENCE:CVE-2022-30313:DESCRIPTION:Safety Instrumented System uses proprietary TCP protocols with no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30313::REFERENCE:CVE-2022-30317:DESCRIPTION:Distributed Control System (DCS) uses a protocol that has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30317::REFERENCE:CVE-2021-21972:DESCRIPTION:Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (CWE-306), then uses .. path traversal sequences (CWE-23) in the file to access unexpected files, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-21972::REFERENCE:CVE-2020-10263:DESCRIPTION:Bluetooth speaker does not require authentication for the debug functionality on the UART port, allowing root shell access:LINK:https://www.cve.org/CVERecord?id=CVE-2020-10263::REFERENCE:CVE-2021-23147:DESCRIPTION:WiFi router does not require authentication for its UART port, allowing adversaries with physical access to execute commands as root:LINK:https://www.cve.org/CVERecord?id=CVE-2021-23147::REFERENCE:CVE-2021-37415:DESCRIPTION:IT management product does not perform authentication for some REST API requests, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-37415::REFERENCE:CVE-2020-13927:DESCRIPTION:Default setting in workflow management product allows all API requests without authentication, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-13927::REFERENCE:CVE-2002-1810:DESCRIPTION:MFV. Access TFTP server without authentication and obtain configuration file with sensitive plaintext information.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1810::REFERENCE:CVE-2008-6827:DESCRIPTION:Agent software running at privileges does not authenticate incoming requests over an unprotected channel, allowing a Shatter attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-6827::REFERENCE:CVE-2004-0213:DESCRIPTION:Product enforces restrictions through a GUI but not through privileged APIs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0213::REFERENCE:CVE-2020-15483:DESCRIPTION:monitor device allows access to physical UART debug port without authentication:LINK:https://www.cve.org/CVERecord?id=CVE-2020-15483::REFERENCE:CVE-2019-9201:DESCRIPTION:Programmable Logic Controller (PLC) does not have an authentication feature on its communication protocols.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-9201::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:No Authentication for Critical Function::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP31:ENTRY NAME:Missing authentication::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 1.1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 1.2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 2.1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SR-2::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SVV-3::
|
::12::166::216::36::62::
| null | null | 306
|
Improper Restriction of Excessive Authentication Attempts
|
Base
|
Draft
|
The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame, making it more susceptible to brute force attacks.
| null |
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:287:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:799:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:An attacker could perform an arbitrary number of authentication attempts using different passwords, and eventually gain access to the targeted account.::
|
::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Web Application Scanner Web Services Scanner Database Scanners Cost effective for partial coverage: Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteria:EFFECTIVENESS:High::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Fuzz Tester Framework-based Fuzzer Cost effective for partial coverage: Forced Path Execution:EFFECTIVENESS:High::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Highly cost effective: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:High::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Configuration Checker:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review: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.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Common protection mechanisms include: Disconnecting the user after a small number of failed attempts Implementing a timeout Locking out a targeted account Requiring a computational task on the user's part.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks: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. Consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator. [REF-45]::
|
::REFERENCE:CVE-2019-0039:DESCRIPTION:the REST API for a network OS has a high limit for number of connections, allowing brute force password guessing:LINK:https://www.cve.org/CVERecord?id=CVE-2019-0039::REFERENCE:CVE-1999-1152:DESCRIPTION:Product does not disconnect or timeout after multiple failed logins.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1152::REFERENCE:CVE-2001-1291:DESCRIPTION:Product does not disconnect or timeout after multiple failed logins.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1291::REFERENCE:CVE-2001-0395:DESCRIPTION:Product does not disconnect or timeout after multiple failed logins.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0395::REFERENCE:CVE-2001-1339:DESCRIPTION:Product does not disconnect or timeout after multiple failed logins.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1339::REFERENCE:CVE-2002-0628:DESCRIPTION:Product does not disconnect or timeout after multiple failed logins.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0628::REFERENCE:CVE-1999-1324:DESCRIPTION:User accounts not disabled when they exceed a threshold; possibly a resultant problem.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-1324::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY ID:AUTHENT.MULTFAIL:ENTRY NAME:Multiple Failed Authentication Attempts not Prevented::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP34:ENTRY NAME:Unrestricted authentication::
|
::16::49::560::565::600::652::653::
| null | null | 307
|
Use of Single-factor Authentication
|
Base
|
Draft
|
The use of single-factor authentication can lead to unnecessary risk of compromise when compared with the benefits of a dual-factor authentication scheme.
|
While the use of multiple authentication schemes is simply piling on more complexity on top of authentication, it is inestimably valuable to have such measures of redundancy. The use of weak, reused, and common passwords is rampant on the internet. Without the added protection of multiple authentication schemes, a single mistake can result in the compromise of an account. For this reason, if multiple schemes are possible and also easy to use, they should be implemented and required.
|
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:654:VIEW ID:1000::NATURE:PeerOf:CWE ID:309:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If the secret in a single-factor authentication scheme gets compromised, full authentication is possible.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Use multiple independent authentication schemes, which ensures that -- if one of the methods is compromised -- the system itself is still likely safe from compromise.::
|
::REFERENCE:CVE-2022-35248:DESCRIPTION:Chat application skips validation when Central Authentication Service (CAS) is enabled, effectively removing the second factor from two-factor authentication:LINK:https://www.cve.org/CVERecord?id=CVE-2022-35248::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Using single-factor authentication::
|
::16::49::509::55::555::560::561::565::600::644::645::652::653::70::
| null | null | 308
|
Use of Password System for Primary Authentication
|
Base
|
Draft
|
The use of password systems as the primary means of authentication may be subject to several flaws or shortcomings, each reducing the effectiveness of the mechanism.
| null |
::NATURE:ChildOf:CWE ID:1390:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:654:VIEW ID:1000::NATURE:PeerOf:CWE ID:308:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
|
::Password systems are the simplest and most ubiquitous authentication mechanisms. However, they are subject to such well known attacks,and such frequent compromise that their use in the most simple implementation is not practical.::
| null |
::PHASE:Architecture and Design::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:A password authentication mechanism error will almost always result in attackers being authorized as valid users.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:In order to protect password systems from compromise, the following should be noted: Passwords should be stored safely to prevent insider attack and to ensure that -- if a system is compromised -- the passwords are not retrievable. Due to password reuse, this information may be useful in the compromise of other systems these users work with. In order to protect these passwords, they should be stored encrypted, in a non-reversible state, such that the original text password cannot be extracted from the stored value. Password aging should be strictly enforced to ensure that passwords do not remain unchanged for long periods of time. The longer a password remains in use, the higher the probability that it has been compromised. For this reason, passwords should require refreshing periodically, and users should be informed of the risk of passwords which remain in use for too long. Password strength should be enforced intelligently. Rather than restrict passwords to specific content, or specific length, users should be encouraged to use upper and lower case letters, numbers, and symbols in their passwords. The system should also ensure that no passwords are derived from dictionary words.::PHASE:Architecture and Design:DESCRIPTION:Use a zero-knowledge password protocol, such as SRP.::PHASE:Architecture and Design:DESCRIPTION:Ensure that passwords are stored safely and are not reversible.::PHASE:Architecture and Design:DESCRIPTION:Implement password aging functionality that requires passwords be changed after a certain point.::PHASE:Architecture and Design:DESCRIPTION:Use a mechanism for determining the strength of a password and notify the user of weak password use.::PHASE:Architecture and Design:DESCRIPTION:Inform the user of why password protections are in place, how they work to protect data integrity, and why it is important to heed their warnings.::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Using password systems::TAXONOMY NAME:OWASP Top Ten 2004:ENTRY ID:A3:ENTRY NAME:Broken Authentication and Session Management:MAPPING FIT:CWE More Specific::
|
::16::49::509::55::555::560::561::565::600::652::653::70::
| null | null | 309
|
Cleartext Storage of Sensitive Information
|
Base
|
Draft
|
The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.
|
Because the information is stored in cleartext (i.e., unencrypted), attackers could potentially read it. Even if the information is encoded in a way that is not human-readable, certain techniques could determine which encoding is being used, then decode the information. When organizations adopt cloud services, it can be easier for attackers to access the data from anywhere on the Internet. In some systems/environments such as cloud, the use of double encryption (at both the software and hardware layer) might be required, and the developer might be solely responsible for both layers, instead of shared responsibility with the administrator of the broader system/environment.
|
::NATURE:ChildOf:CWE ID:311:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:311:VIEW ID:1003:ORDINAL:Primary::NATURE:ChildOf:CWE ID:922:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Cloud Computing:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:Mobile:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::
| null | null |
::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:An attacker with access to the system could read sensitive information stored in cleartext.::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Implementation System Configuration Operation:DESCRIPTION:When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to encrypt the data at rest. [REF-1297] [REF-1299] [REF-1301]::
|
::REFERENCE:CVE-2022-30275:DESCRIPTION:Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30275::REFERENCE:CVE-2009-2272:DESCRIPTION:password and username stored in cleartext in a cookie:LINK:https://www.cve.org/CVERecord?id=CVE-2009-2272::REFERENCE:CVE-2009-1466:DESCRIPTION:password stored in cleartext in a file with insecure permissions:LINK:https://www.cve.org/CVERecord?id=CVE-2009-1466::REFERENCE:CVE-2009-0152:DESCRIPTION:chat program disables SSL in some circumstances even when the user says to use SSL.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-0152::REFERENCE:CVE-2009-1603:DESCRIPTION:Chain: product uses an incorrect public exponent when generating an RSA key, which effectively disables the encryption:LINK:https://www.cve.org/CVERecord?id=CVE-2009-1603::REFERENCE:CVE-2009-0964:DESCRIPTION:storage of unencrypted passwords in a database:LINK:https://www.cve.org/CVERecord?id=CVE-2009-0964::REFERENCE:CVE-2008-6157:DESCRIPTION:storage of unencrypted passwords in a database:LINK:https://www.cve.org/CVERecord?id=CVE-2008-6157::REFERENCE:CVE-2008-6828:DESCRIPTION:product stores a password in cleartext in memory:LINK:https://www.cve.org/CVERecord?id=CVE-2008-6828::REFERENCE:CVE-2008-1567:DESCRIPTION:storage of a secret key in cleartext in a temporary file:LINK:https://www.cve.org/CVERecord?id=CVE-2008-1567::REFERENCE:CVE-2008-0174:DESCRIPTION:SCADA product uses HTTP Basic Authentication, which is not encrypted:LINK:https://www.cve.org/CVERecord?id=CVE-2008-0174::REFERENCE:CVE-2007-5778:DESCRIPTION:login credentials stored unencrypted in a registry key:LINK:https://www.cve.org/CVERecord?id=CVE-2007-5778::REFERENCE:CVE-2001-1481:DESCRIPTION:Plaintext credentials in world-readable file.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1481::REFERENCE:CVE-2005-1828:DESCRIPTION:Password in cleartext in config file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1828::REFERENCE:CVE-2005-2209:DESCRIPTION:Password in cleartext in config file.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2209::REFERENCE:CVE-2002-1696:DESCRIPTION:Decrypted copy of a message written to disk given a combination of options and when user replies to an encrypted message.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1696::REFERENCE:CVE-2004-2397:DESCRIPTION:Plaintext storage of private key and passphrase in log file when user imports the key.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2397::REFERENCE:CVE-2002-1800:DESCRIPTION:Admin password in plaintext in a cookie.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1800::REFERENCE:CVE-2001-1537:DESCRIPTION:Default configuration has cleartext usernames/passwords in cookie.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1537::REFERENCE:CVE-2001-1536:DESCRIPTION:Usernames/passwords in cleartext in cookies.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1536::REFERENCE:CVE-2005-2160:DESCRIPTION:Authentication information stored in cleartext in a cookie.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2160::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Plaintext Storage of Sensitive Information::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 4.1 a)::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 4.1::
|
::37::
|
::TYPE:Terminology:NOTE:Different people use cleartext and plaintext to mean the same thing: the lack of encryption. However, within cryptography, these have more precise meanings. Plaintext is the information just before it is fed into a cryptographic algorithm, including already-encrypted text. Cleartext is any information that is unencrypted, although it might be in an encoded form that is not easily human-readable (such as base64 encoding).::
| null | 312
|
Cleartext Transmission of Sensitive Information
|
Base
|
Draft
|
The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.
|
Many communication channels can be sniffed (monitored) by adversaries during data transmission. For example, in networking, packets can traverse many intermediary nodes from the source to the destination, whether across the internet, an internal network, the cloud, etc. Some actors might have privileged access to a network interface or any link along the channel, such as a router, but they might not be authorized to collect the underlying data. As a result, network traffic could be sniffed by adversaries, spilling security-critical data. Applicable communication channels are not limited to software products. Applicable channels include hardware-specific technologies such as internal hardware networks and external debug channels, supporting remote JTAG debugging. When mitigations are not applied to combat adversaries within the product's threat model, this weakness significantly lowers the difficulty of exploitation by such adversaries. When full communications are recorded or logged, such as with a packet dump, an adversary could attempt to obtain the dump long after the transmission has occurred and try to sniff the cleartext from the recorded communications in the dump itself. Even if the information is encoded in a way that is not human-readable, certain techniques could determine which encoding is being used, then decode the information.
|
::NATURE:ChildOf:CWE ID:311:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:311:VIEW ID:1003:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Cloud Computing:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:Mobile:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Often::TECHNOLOGY CLASS:System on Chip:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY NAME:Test/Debug Hardware:TECHNOLOGY PREVALENCE:Often::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::PHASE:Architecture and Design:NOTE:For hardware, this may be introduced when design does not plan for an attacker having physical access while a legitimate user is remotely operating the device.::PHASE:Operation::PHASE:System Configuration::
| null | null |
::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Modify Files or Directories:NOTE:Anyone can read the information by gaining access to the channel being used for communication.::
|
::METHOD:Black Box:DESCRIPTION:Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process, trigger the feature that sends the data, and look for the presence or absence of common cryptographic functions in the call tree. Monitor the network and determine if the data packets contain readable commands. Tools exist for detecting if certain encodings are in use. If the traffic contains high entropy, this might indicate the usage of encryption.::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Before transmitting, encrypt the data using reliable, confidentiality-protecting cryptographic protocols.::PHASE:Implementation:DESCRIPTION:When using web applications with SSL, use SSL for the entire session from login to logout, not just for the initial login page.::PHASE:Implementation:DESCRIPTION:When designing hardware platforms, ensure that approved encryption algorithms (such as those recommended by NIST) protect paths from security critical data to trusted user applications.::PHASE:Testing:DESCRIPTION:Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.::PHASE:Operation:DESCRIPTION:Configure servers to use encrypted channels for communication, which may include SSL or other secure protocols.::
|
::REFERENCE:CVE-2022-29519:DESCRIPTION:Programmable Logic Controller (PLC) sends sensitive information in plaintext, including passwords and session tokens.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29519::REFERENCE:CVE-2022-30312:DESCRIPTION:Building Controller uses a protocol that transmits authentication credentials in plaintext.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30312::REFERENCE:CVE-2022-31204:DESCRIPTION:Programmable Logic Controller (PLC) sends password in plaintext.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-31204::REFERENCE:CVE-2002-1949:DESCRIPTION:Passwords transmitted in cleartext.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1949::REFERENCE:CVE-2008-4122:DESCRIPTION:Chain: Use of HTTPS cookie without secure flag causes it to be transmitted across unencrypted HTTP.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4122::REFERENCE:CVE-2008-3289:DESCRIPTION:Product sends password hash in cleartext in violation of intended policy.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-3289::REFERENCE:CVE-2008-4390:DESCRIPTION:Remote management feature sends sensitive information including passwords in cleartext.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4390::REFERENCE:CVE-2007-5626:DESCRIPTION:Backup routine sends password in cleartext in email.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-5626::REFERENCE:CVE-2004-1852:DESCRIPTION:Product transmits Blowfish encryption key in cleartext.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-1852::REFERENCE:CVE-2008-0374:DESCRIPTION:Printer sends configuration information, including administrative password, in cleartext.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-0374::REFERENCE:CVE-2007-4961:DESCRIPTION:Chain: cleartext transmission of the MD5 hash of password enables attacks against a server that is susceptible to replay (CWE-294).:LINK:https://www.cve.org/CVERecord?id=CVE-2007-4961::REFERENCE:CVE-2007-4786:DESCRIPTION:Product sends passwords in cleartext to a log server.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-4786::REFERENCE:CVE-2005-3140:DESCRIPTION:Product sends file with cleartext passwords in e-mail message intended for diagnostic purposes.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3140::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Plaintext Transmission of Sensitive Information::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SEC06-J:ENTRY NAME:Do not rely on the default automatic signature verification provided by URLClassLoader and java.util.jar::TAXONOMY NAME:The CERT Oracle Secure Coding Standard for Java (2011):ENTRY ID:SER02-J:ENTRY NAME:Sign then seal sensitive objects before sending them outside a trust boundary::TAXONOMY NAME:Software Fault Patterns:ENTRY ID:SFP23:ENTRY NAME:Exposed Data::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 3-3:ENTRY NAME:Req SR 4.1::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-2:ENTRY NAME:Req CR 4.1B::
|
::102::117::383::477::65::
|
::TYPE:Maintenance:NOTE:The Taxonomy_Mappings to ISA/IEC 62443 were added in CWE 4.10, but they are still under review and might change in future CWE versions. These draft mappings were performed by members of the Mapping CWE to 62443 subgroup of the CWE-CAPEC ICS/OT Special Interest Group (SIG), and their work is incomplete as of CWE 4.10. The mappings are included to facilitate discussion and review by the broader ICS/OT community, and they are likely to change in future CWE versions.::
| null | 319
|
Key Exchange without Entity Authentication
|
Base
|
Draft
|
The product performs a key exchange with an actor without verifying the identity of that actor.
|
Performing a key exchange will preserve the integrity of the information sent between two entities, but this will not guarantee that the entities are who they claim they are. This may enable an attacker to impersonate an actor by modifying traffic between the two entities. Typically, this involves a victim client that contacts a malicious server that is impersonating a trusted server. If the client skips authentication or ignores an authentication failure, the malicious server may request authentication information from the user. The malicious server can then use this authentication information to log in to the trusted server using the victim's credentials, sniff traffic between the victim and trusted server, etc.
|
::NATURE:ChildOf:CWE ID:306:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:923:VIEW ID:1000::NATURE:PeerOf:CWE ID:295:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:No authentication takes place in this process, bypassing an assumed protection of encryption.::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:The encrypted communication between a user and a trusted host may be subject to sniffing by any actor in the communication path.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Ensure that proper authentication is included in the system design.::PHASE:Implementation:DESCRIPTION:Understand and properly implement all checks necessary to ensure the identity of entities involved in encrypted communications.::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Key exchange without entity authentication::
| null | null | null | 322
|
Reusing a Nonce, Key Pair in Encryption
|
Base
|
Incomplete
|
Nonces should be used for the present occasion and only once.
| null |
::NATURE:ChildOf:CWE ID:344:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
|
::Nonces are often bundled with a key in a communication exchange to produce a new session key for each exchange.::
| null |
::PHASE:Architecture and Design:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:Potentially a replay attack, in which an attacker could send the same data twice, could be crafted if nonces are allowed to be reused. This could allow a user to send a message which masquerades as a valid message from a valid user.::
| null |
::PHASE:Implementation:DESCRIPTION:Refuse to reuse nonce values.::PHASE:Implementation:DESCRIPTION:Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.::
| null | null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Reusing a nonce, key pair in encryption::
| null | null | null | 323
|
Use of a Key Past its Expiration Date
|
Base
|
Draft
|
The product uses a cryptographic key or password past its expiration date, which diminishes its safety significantly by increasing the timing window for cracking attacks against that key.
|
While the expiration of keys does not necessarily ensure that they are compromised, it is a significant concern that keys which remain in use for prolonged periods of time have a decreasing probability of integrity. For this reason, it is important to replace keys within a period of time proportional to their strength.
|
::NATURE:ChildOf:CWE ID:672:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:298:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:The cryptographic key in question may be compromised, providing a malicious user with a method for authenticating as the victim.::
| null |
::PHASE:Architecture and Design:DESCRIPTION:Adequate consideration should be put in to the user interface in order to notify users previous to the key's expiration, to explain the importance of new key generation and to walk users through the process as painlessly as possible.::
|
::REFERENCE:CVE-2021-33020:DESCRIPTION:Picture Archiving and Communication System (PACS) system for hospitals uses a cryptographic key or password past its expiration date:LINK:https://www.cve.org/CVERecord?id=CVE-2021-33020::
| null | null |
::TAXONOMY NAME:CLASP:ENTRY NAME:Using a key past its expiration date::
| null | null | null | 324
|
Missing Cryptographic Step
|
Base
|
Draft
|
The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.
| null |
::NATURE:ChildOf:CWE ID:573:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:358:VIEW ID:1000::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Implementation:NOTE:Developers sometimes omit expensive (resource-intensive) steps in order to improve performance, especially in devices with limited memory or slower CPUs. This step may be taken under a mistaken impression that the step is unnecessary for the cryptographic algorithm.::PHASE:Requirements:NOTE:This issue may happen when the requirements for the cryptographic algorithm are not clearly stated.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::SCOPE:Accountability:SCOPE:Non-Repudiation:IMPACT:Hide Activities::
| null | null |
::REFERENCE:CVE-2001-1585:DESCRIPTION:Missing challenge-response step allows authentication bypass using public key.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1585::
|
::Cryptography::
| null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Missing Required Cryptographic Step::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A8:ENTRY NAME:Insecure Cryptographic Storage:MAPPING FIT:CWE More Specific::TAXONOMY NAME:OWASP Top Ten 2007:ENTRY ID:A9:ENTRY NAME:Insecure Communications:MAPPING FIT:CWE More Specific::
|
::68::
|
::TYPE:Relationship:NOTE:Overlaps incomplete/missing security check.::TYPE:Relationship:NOTE:Can be resultant.::
| null | 325
|
Use of Weak Hash
|
Base
|
Draft
|
The product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack).
|
A hash function is defined as an algorithm that maps arbitrarily sized data into a fixed-sized digest (output) such that the following properties hold: The algorithm is not invertible (also called one-way or not reversible) The algorithm is deterministic; the same input produces the same digest every time Building on this definition, a cryptographic hash function must also ensure that a malicious actor cannot leverage the hash function to have a reasonable chance of success at determining any of the following: the original input (preimage attack), given only the digest another input that can produce the same digest (2nd preimage attack), given the original input a set of two or more inputs that evaluate to the same digest (birthday attack), given the actor can arbitrarily choose the inputs to be hashed and can do so a reasonable amount of times What is regarded as reasonable varies by context and threat model, but in general, reasonable could cover any attack that is more efficient than brute force (i.e., on average, attempting half of all possible combinations). Note that some attacks might be more efficient than brute force but are still not regarded as achievable in the real world. Any algorithm that does not meet the above conditions will generally be considered weak for general use in hashing. In addition to algorithmic weaknesses, a hash function can be made weak by using the hash in a security context that breaks its security guarantees. For example, using a hash function without a salt for storing passwords (that are sufficiently short) could enable an adversary to create a rainbow table [REF-637] to recover the password under certain conditions; this attack works against such hash functions as MD5, SHA-1, and SHA-2.
|
::NATURE:ChildOf:CWE ID:326:VIEW ID:1000::NATURE:ChildOf:CWE ID:327:VIEW ID:1000:ORDINAL:Primary::
| null |
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
| null | null |
::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::
| null | null |
::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::
|
::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect sources (origins of input) with sinks (destinations where the data interacts with external components, a lower layer such as the OS, etc.):EFFECTIVENESS:High::
|
::PHASE:Architecture and Design:DESCRIPTION:Use an adaptive hash function that can be configured to change the amount of computational effort needed to compute the hash, such as the number of iterations (stretching) or the amount of memory required. Some hash functions perform salting automatically. These functions can significantly increase the overhead for a brute force attack compared to intentionally-fast functions such as MD5. For example, rainbow table attacks can become infeasible due to the high computing overhead. Finally, since computing power gets faster and cheaper over time, the technique can be reconfigured to increase the workload without forcing an entire replacement of the algorithm in use. Some hash functions that have one or more of these desired properties include bcrypt [REF-291], scrypt [REF-292], and PBKDF2 [REF-293]. While there is active debate about which of these is the most effective, they are all stronger than using salts with hash functions with very little computing overhead. Note that using these functions can have an impact on performance, so they require special consideration to avoid denial-of-service attacks. However, their configurability provides finer control over how much CPU and memory is used, so it could be adjusted to suit the environment's needs.:EFFECTIVENESS:High::
|
::REFERENCE:CVE-2022-30320:DESCRIPTION:Programmable Logic Controller (PLC) uses a protocol with a cryptographically insecure hashing algorithm for passwords.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30320::REFERENCE:CVE-2005-4900:DESCRIPTION:SHA-1 algorithm is not collision-resistant.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-4900::REFERENCE:CVE-2020-25685:DESCRIPTION:DNS product uses a weak hash (CRC32 or SHA-1) of the query name, allowing attacker to forge responses by computing domain names with the same hash.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-25685::REFERENCE:CVE-2012-6707:DESCRIPTION:blogging product uses MD5-based algorithm for passwords.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-6707::REFERENCE:CVE-2019-14855:DESCRIPTION:forging of certificate signatures using SHA-1 collisions.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-14855::REFERENCE:CVE-2017-15999:DESCRIPTION:mobile app for backup sends SHA-1 hash of password in cleartext.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-15999::REFERENCE:CVE-2006-4068:DESCRIPTION:Hard-coded hashed values for username and password contained in client-side script, allowing brute-force offline attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4068::
| null | null |
::TAXONOMY NAME:PLOVER:ENTRY NAME:Reversible One-Way Hash::
|
::461::68::
|
::TYPE:Maintenance:NOTE:Since CWE 4.4, various cryptography-related entries including CWE-328 have been slated for extensive research, analysis, and community consultation to define consistent terminology, improve relationships, and reduce overlap or duplication. As of CWE 4.6, this work is still ongoing.::
| null | 328
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.