File size: 478,230 Bytes
c137fd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
{"id": "CWE-15", "name": "External Control of System or Configuration Setting", "description": "One or more system settings or configuration elements can be externally controlled by a user.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:Allowing external control of system settings can disrupt service or cause an application to behave in unexpected, and potentially malicious ways.::", "mitigations": "::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.::"}
{"id": "CWE-22", "name": "Improper Limitation of a Pathname to a Restricted Directory", "description": "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.", "extended": "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 to access unexpected files. This is referred to as absolute path traversal.", "consequences": "::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 to 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 ", "mitigations": "::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"}
{"id": "CWE-41", "name": "Improper Resolution of Path Equivalence", "description": "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.", "extended": "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.", "consequences": "::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.::", "mitigations": "::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,"}
{"id": "CWE-59", "name": "Improper Link Resolution Before File Access", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-66", "name": "Improper Handling of File Names that Identify Virtual Resources", "description": "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.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:The product could perform file-based operations on a resource that is not a file.::", "mitigations": ""}
{"id": "CWE-73", "name": "External Control of File Name or Path", "description": "The product allows user input to control or influence paths or file names that are used in filesystem operations.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Files or Directories:NOTE:The application can operate on unexpected files, such as system files or configuration 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 for", "mitigations": "::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 go"}
{"id": "CWE-76", "name": "Improper Neutralization of Equivalent Special Elements", "description": "The product correctly neutralizes certain special elements, but it improperly neutralizes equivalent special elements.", "extended": "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.", "consequences": "::SCOPE:Other:IMPACT:Other::", "mitigations": "::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.::"}
{"id": "CWE-78", "name": "Improper Neutralization of Special Elements used in an OS Command", "description": "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 before it is sent to a downstream component.", "extended": "", "consequences": "::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 operating system 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.::", "mitigations": "::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 ar"}
{"id": "CWE-79", "name": "Improper Neutralization of Input During Web Page Generation", "description": "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.", "extended": "", "consequences": "::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 private information stored in user cookies, such as session information. Typically, a malicious user will craft a client-side script, which -- when parsed by a web browser -- performs some activity on behalf of the victim to an attacker-controlled system (such as sending all site cookies to a given E-mail address). This could be especially dangerous to the site if the victim has administrator privileges to manage that site. 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 c", "mitigations": "::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 [REF-1482]. 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 nee"}
{"id": "CWE-88", "name": "Improper Neutralization of Argument Delimiters in a Command", "description": "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.", "extended": "", "consequences": "::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: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, potentially changing the expected behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences. The attacker could include arguments that allow unintended commands or code to be executed, allow sensitive data to be read or modified, or cause other unintended behavior.::", "mitigations": "::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, consi"}
{"id": "CWE-89", "name": "Improper Neutralization of Special Elements used in an SQL Command", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:Adversaries could execute system commands, typically by changing the SQL statement to redirect output to a file that can then be executed.::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:Authentication:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:NOTE:If poor SQL commands are used to check user names and passwords or perform other kinds of authentication, it may be possible to connect to the product 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:Integr", "mitigations": "::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 [REF-1482]. 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 acc"}
{"id": "CWE-90", "name": "Improper Neutralization of Special Elements used in an LDAP Query", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-91", "name": "XML Injection", "description": "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.", "extended": "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.", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": "::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.::"}
{"id": "CWE-93", "name": "Improper Neutralization of CRLF Sequences", "description": "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.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Avoid using CRLF as a special sequence.::PHASE:Implementation:DESCRIPTION:Appropriately filter or quote CRLF sequences in user-controlled input.::"}
{"id": "CWE-94", "name": "Improper Control of Generation of Code", "description": "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.", "extended": "", "consequences": "::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: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. As a result, code injection can often result in the execution of arbitrary code. Code injection attacks can also lead to loss of data integrity in nearly all cases, since the control-plane data injected is always incidental to data recall or writing.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:Often the actions performed by injected control code are unlogged.::", "mitigations": "::PHASE:Architecture and Design:STRATEGY:Refactoring: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"}
{"id": "CWE-112", "name": "Missing XML Validation", "description": "The product accepts XML from an untrusted source but does not validate the XML against the proper schema.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State:IMPACT:Varies by Context:NOTE: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.::", "mitigations": "::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.::"}
{"id": "CWE-115", "name": "Misinterpretation of Input", "description": "The product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-117", "name": "Improper Output Neutralization for Logs", "description": "The product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file.", "extended": "", "consequences": "::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.::", "mitigations": "::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,"}
{"id": "CWE-120", "name": "Buffer Copy without Checking Size of Input", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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 c"}
{"id": "CWE-124", "name": "Buffer Underwrite", "description": "The product writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.", "extended": "", "consequences": "::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 ", "mitigations": "::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.::"}
{"id": "CWE-125", "name": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:An attacker could get secret values such as cryptographic keys, PII, memory addresses, or other information that could be used in additional attacks.::SCOPE:Confidentiality:IMPACT:Bypass Protection Mechanism:NOTE:Out-of-bounds memory could contain memory addresses or other information that can be used to bypass ASLR and other protection mechanisms in order to improve the reliability of exploiting a separate weakness for code execution.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:An attacker could cause a segmentation fault or crash by causing memory to be read outside of the bounds of the buffer. This is especially likely 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.::SCOPE:Other:IMPACT:Varies by Context:NOTE:The read operation could produce other undefined or unexpected results.::", "mitigations": "::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 Desig"}
{"id": "CWE-128", "name": "Wrap-around Error", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-130", "name": "Improper Handling of Length Parameter Inconsistency", "description": "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.", "extended": "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.", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Memory:IMPACT:Modify Memory:IMPACT:Varies by Context::", "mitigations": "::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.::"}
{"id": "CWE-131", "name": "Incorrect Calculation of Buffer Size", "description": "The product does not correctly calculate the size to be used when allocating a buffer.", "extended": "", "consequences": "::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.::", "mitigations": "::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 &amp; 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 cl"}
{"id": "CWE-134", "name": "Use of Externally-Controlled Format String", "description": "The product uses a function that accepts a format string as an argument, but the format string originates from an external source.", "extended": "", "consequences": "::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, buffer overflows, denial of service, or incorrect data representation.::", "mitigations": "::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.::"}
{"id": "CWE-135", "name": "Incorrect Calculation of Multi-Byte String Length", "description": "The product does not correctly calculate the length of strings that can contain wide or multi-byte characters.", "extended": "", "consequences": "::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", "mitigations": "::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.)::"}
{"id": "CWE-140", "name": "Improper Neutralization of Delimiters", "description": "The product does not neutralize or incorrectly neutralizes delimiters.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": "::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 outr"}
{"id": "CWE-166", "name": "Improper Handling of Missing Special Element", "description": "The product receives input from an upstream component, but it does not handle or incorrectly handles when an expected special element is missing.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart::", "mitigations": "::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:D"}
{"id": "CWE-167", "name": "Improper Handling of Additional Special Element", "description": "The product receives input from an upstream component, but it does not handle or incorrectly handles when an additional unexpected special element is provided.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": "::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 Enco"}
{"id": "CWE-168", "name": "Improper Handling of Inconsistent Special Elements", "description": "The product does not properly handle input in which an inconsistency exists between two or more special characters or reserved words.", "extended": "An example of this problem would be if paired characters appear in the wrong order, or if the special characters are not properly nested.", "consequences": "::SCOPE:Availability:SCOPE:Access Control:SCOPE:Non-Repudiation:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Bypass Protection Mechanism:IMPACT:Hide Activities::", "mitigations": "::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:S"}
{"id": "CWE-170", "name": "Improper Null Termination", "description": "The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.", "extended": "", "consequences": "::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:Mo", "mitigations": "::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).::"}
{"id": "CWE-178", "name": "Improper Handling of Case Sensitivity", "description": "The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE: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.::", "mitigations": "::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 inter"}
{"id": "CWE-179", "name": "Incorrect Behavior Order: Early Validation", "description": "The product validates input before applying protection mechanisms that modify the input.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could bypass the protection mechanism by including dangerous inputs that are only produced after the modification (such as canonicalization and cleansing). This can be used to launch various attacks including injection, executing arbitrary code, or causing other unintended behavior.::", "mitigations": "::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.::"}
{"id": "CWE-182", "name": "Collapse of Data into Unsafe Value", "description": "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.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": "::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 inter"}
{"id": "CWE-183", "name": "Permissive List of Allowed Inputs", "description": "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.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": ""}
{"id": "CWE-184", "name": "Incomplete List of Disallowed Inputs", "description": "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.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:Attackers may be able to find other malicious inputs that were not expected by the developer, allowing them to bypass the intended protection mechanism.::", "mitigations": "::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.::"}
{"id": "CWE-186", "name": "Overly Restrictive Regular Expression", "description": "A regular expression is overly restrictive in a way that does not match all intended values.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Varies by Context:NOTE: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.::", "mitigations": "::PHASE:Implementation:STRATEGY:Refactoring: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.::"}
{"id": "CWE-190", "name": "Integer Overflow or Wraparound", "description": "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 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 become a very small or negative number.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Instability:NOTE:This weakness can generally lead to undefined behavior and therefore crashes. When the calculated result is used for resource allocation, this weakness can cause too many (or too few) resources to be allocated, possibly enabling crashes if the product requests more resources than can be provided. If the calculated result involves time values, then the product might crash when it encounters a time that is less than the previously-calculated time.::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 overflow/wraparound 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:Th", "mitigations": "::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 [REF-1482]. 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 calculat"}
{"id": "CWE-191", "name": "Integer Underflow (Wrap or Wraparound)", "description": "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.", "extended": "This can happen in signed and unsigned cases.", "consequences": "::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.::", "mitigations": ""}
{"id": "CWE-193", "name": "Off-by-one Error", "description": "A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.", "extended": "", "consequences": "::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.::", "mitigations": "::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().::"}
{"id": "CWE-201", "name": "Insertion of Sensitive Information Into Sent Data", "description": "The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Files or Directories:IMPACT:Read Memory:IMPACT:Read Application Data:NOTE:Sensitive data may be exposed to attackers.::", "mitigations": "::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.::"}
{"id": "CWE-204", "name": "Observable Response Discrepancy", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism::", "mitigations": "::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 wheth"}
{"id": "CWE-205", "name": "Observable Behavioral Discrepancy", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism:NOTE: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.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ideally, a product should provide as little information about its internal operations as possible.::"}
{"id": "CWE-208", "name": "Observable Timing Discrepancy", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Bypass Protection Mechanism:NOTE: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.::", "mitigations": ""}
{"id": "CWE-209", "name": "Generation of Error Message Containing Sensitive Information", "description": "The product generates an error message that includes sensitive information about its environment, users, or associated data.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Often this will either reveal sensitive information which may be used to launch another, more focused attack or disclose private information stored in the server. 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.::", "mitigations": "::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 w"}
{"id": "CWE-212", "name": "Improper Removal of Sensitive Information Before Storage or Transfer", "description": "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.", "extended": "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.", "consequences": "::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 that will depend on what data is exposed. One possibility is the exposure of system data - such as file locations, software versions, or device data - that allow an attacker to craft a specific, more effective attack. Alternately, insufficient redaction of Private Personal Information (PPI), Personally Identifiable Information (PII), or other types of information might not harm the secure operation of the product itself, but could be violations of expectations by the product's users.::", "mitigations": "::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 Operation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Some tools can automatically analyze documents to redact, strip, or sanitize private information, although some human review might be necessary. Tools may vary in terms of which document formats can be processed. When calling an external program to automatically generate or convert documents, invoke the program with any available options that avoid generating sensitive metadata. Some formats have well-defined fields that could contain private data, such as Exchangeable image file f"}
{"id": "CWE-213", "name": "Exposure of Sensitive Information Due to Incompatible Policies", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data::", "mitigations": "::PHASE:Requirements Architecture and Design:DESCRIPTION: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.::"}
{"id": "CWE-214", "name": "Invocation of Process Using Visible Sensitive Information", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:When this data contains sensitive information such as credentials, it might allow other users to launch an attack against the product or related resources.::", "mitigations": ""}
{"id": "CWE-215", "name": "Insertion of Sensitive Information Into Debugging Code", "description": "The product inserts sensitive information into debugging code.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Sensitive information could be exposed if the debugging code is not disabled in production.::", "mitigations": "::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.::"}
{"id": "CWE-222", "name": "Truncation of Security-relevant Information", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": ""}
{"id": "CWE-223", "name": "Omission of Security-relevant Information", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": ""}
{"id": "CWE-224", "name": "Obscured Security-relevant Information by Alternate Name", "description": "The product records security-relevant information according to an alternate name of the affected entity, instead of the canonical name.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:SCOPE:Access Control:IMPACT:Hide Activities:IMPACT:Gain Privileges or Assume Identity::", "mitigations": ""}
{"id": "CWE-229", "name": "Improper Handling of Values", "description": "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.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-233", "name": "Improper Handling of Parameters", "description": "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.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-237", "name": "Improper Handling of Structural Elements", "description": "The product does not handle or incorrectly handles inputs that are related to complex structures.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-241", "name": "Improper Handling of Unexpected Data Type", "description": "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).", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State::", "mitigations": "::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 "}
{"id": "CWE-242", "name": "Use of Inherently Dangerous Function", "description": "The product calls a function that can never be guaranteed to work safely, regardless of how it is used.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:The consequences vary depending on the behavior of the affected function.::SCOPE:Other:IMPACT:Modify Memory:NOTE:Some functions can be subject to buffer overflows. For example, an attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer. In C++, an attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.::", "mitigations": "::PHASE:Build and Compilation Implementation:DESCRIPTION:Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the banned.h include file from Microsoft's SDL. [REF-554] [REF-1009] [REF-7]::PHASE:Testing:DESCRIPTION:Use grep or static analysis tools to spot usage of dangerous functions.::"}
{"id": "CWE-243", "name": "Creation of chroot Jail Without Changing Working Directory", "description": "The product uses the chroot() system call to create a jail, but it does not change the working directory afterward.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:NOTE:If the working directory is not changed after the chroot() call, relative paths may still refer to file system resources outside of the jail. Attackers may be able to read or write to files outside of the jail.::", "mitigations": ""}
{"id": "CWE-248", "name": "Uncaught Exception", "description": "An exception is thrown from a function, but it is not caught.", "extended": "", "consequences": "::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.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:The choice between a language which has named or unnamed exceptions needs to be done. While unnamed exceptions exacerbate the chance of not properly dealing with an exception, named exceptions suffer from the up call version of the weak base class problem.::PHASE:Requirements:DESCRIPTION:A language can be used which requires, at compile time, to catch all serious exceptions. However, one must make sure to use the most current version of the API as new exceptions could be added.::PHASE:Implementation:DESCRIPTION:Catch all relevant exceptions. This is the recommended solution. Ensure that all exceptions are handled in such a way that you can be sure of the state of your system at any given moment.::"}
{"id": "CWE-250", "name": "Execution with Unnecessary Privileges", "description": "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.", "extended": "", "consequences": "::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. 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.::", "mitigations": "::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-7"}
{"id": "CWE-252", "name": "Unchecked Return Value", "description": "The product does not check the return value from a method or function.", "extended": "", "consequences": "::SCOPE:Availability:SCOPE:Integrity:IMPACT:Unexpected State:IMPACT:Varies by Context:IMPACT:DoS: Crash, Exit, or Restart:NOTE:The product could be prevented from detecting unexpected states and conditions, placing the product into a state that could lead to a crash or other unintended behaviors.::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If the method/function is used for a protection mechanism, then an unchecked return value could prevent the code from being able to see if the protection mechanism fails. 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.::", "mitigations": "::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:For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].::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.::"}
{"id": "CWE-253", "name": "Incorrect Check of Function Return Value", "description": "The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-256", "name": "Plaintext Storage of a Password", "description": "The product stores a password in plaintext within resources such as memory or files.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Storing a plaintext password in a configuration file allows anyone who can read the file to access 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.::", "mitigations": "::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::"}
{"id": "CWE-257", "name": "Storing Passwords in a Recoverable Format", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use strong, non-reversible encryption to protect stored passwords.::"}
{"id": "CWE-260", "name": "Password in Configuration File", "description": "The product stores a password in a configuration file that might be accessible to actors who do not know the password.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE: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.::", "mitigations": "::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.::"}
{"id": "CWE-261", "name": "Weak Encoding for Password", "description": "The product uses a weak or trivial encoding for a password.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity::", "mitigations": "::PHASE::DESCRIPTION:Passwords should be encrypted with keys that are at least 128 bits in length for adequate security.::"}
{"id": "CWE-262", "name": "Not Using Password Aging", "description": "The product does not have a mechanism in place for managing password aging.", "extended": "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).", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:As passwords age, the probability that they are compromised grows.::", "mitigations": "::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::"}
{"id": "CWE-263", "name": "Password Aging with Long Expiration", "description": "The product supports password aging, but the expiration period is too long.", "extended": "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).", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:As passwords age, the probability that they are compromised grows. A long expiration provides more time for attackers to conduct password cracking before users are forced to change to a new password.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Previously, password expiration was widely advocated as a defense-in-depth approach to minimize the risk of weak passwords, and it has become a common practice. Password expiration requires a password to be changed within a fixed time window (such as every 90 days). However, this approach has significant limitations in the current threat landscape, and its utility has been reduced in light of the adoption of related protection mechanisms (such as password complexity and computational effort), along with the recognition that regular password changes often caused users to generate more predictable passwords. As a result, this is now a Discouraged Common Practice [REF-1488] [REF-1489], especially as the sole factor in protecting passwords. It is still strongly encouraged to force password changes in case of evidence of compromise, but this is not the same as a forced expiration on an arbitrary time frame.::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:Develope"}
{"id": "CWE-266", "name": "Incorrect Privilege Assignment", "description": "A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-267", "name": "Privilege Defined With Unsafe Actions", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-268", "name": "Privilege Chaining", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-270", "name": "Privilege Context Switching Error", "description": "The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-272", "name": "Least Privilege Violation", "description": "The elevated privilege level required to perform operations such as chroot() should be dropped immediately after the operation is performed.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-273", "name": "Improper Check for Dropped Privileges", "description": "The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:If the drop fails, the product will continue to run with the raised privileges, which might provide additional access to unprivileged users. 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.::", "mitigations": "::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.::"}
{"id": "CWE-274", "name": "Improper Handling of Insufficient Privileges", "description": "The product does not handle or incorrectly handles when it has insufficient privileges to perform an operation.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Other:IMPACT:Alter Execution Logic:NOTE:This can lead to resultant weaknesses.::", "mitigations": ""}
{"id": "CWE-276", "name": "Incorrect Default Permissions", "description": "During installation, installed file permissions are set to allow anyone to modify those files.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": "::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.::"}
{"id": "CWE-277", "name": "Insecure Inherited Permissions", "description": "A product defines a set of insecure permissions that are inherited by objects that are created by the program.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": "::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.::"}
{"id": "CWE-278", "name": "Insecure Preserved Inherited Permissions", "description": "A product inherits a set of insecure permissions for an object, e.g. when copying from an archive file, without user awareness or involvement.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": "::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.::"}
{"id": "CWE-279", "name": "Incorrect Execution-Assigned Permissions", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": "::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.::"}
{"id": "CWE-280", "name": "Improper Handling of Insufficient Permissions or Privileges", "description": "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.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Other:IMPACT:Alter Execution Logic::", "mitigations": "::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.::"}
{"id": "CWE-281", "name": "Improper Preservation of Permissions", "description": "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.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": ""}
{"id": "CWE-283", "name": "Unverified Ownership", "description": "The product does not properly verify that a critical resource is owned by the proper entity.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker could gain unauthorized access to system resources.::", "mitigations": "::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.::"}
{"id": "CWE-289", "name": "Authentication Bypass by Alternate Name", "description": "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.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": "::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 inter"}
{"id": "CWE-290", "name": "Authentication Bypass by Spoofing", "description": "This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.", "extended": "", "consequences": "::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.::", "mitigations": ""}
{"id": "CWE-294", "name": "Authentication Bypass by Capture-replay", "description": "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).", "extended": "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.", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-295", "name": "Improper Certificate Validation", "description": "The product does not validate, or incorrectly validates, a certificate.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Authentication:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE: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.::", "mitigations": "::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.::"}
{"id": "CWE-301", "name": "Reflection Attack in an Authentication Protocol", "description": "Simple authentication protocols are subject to reflection attacks if a malicious user can use the target machine to impersonate a trusted user.", "extended": "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.", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-303", "name": "Incorrect Implementation of Authentication Algorithm", "description": "The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:An incorrect implementation may allow authentication to be bypassed.::", "mitigations": ""}
{"id": "CWE-305", "name": "Authentication Bypass by Primary Weakness", "description": "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.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": ""}
{"id": "CWE-306", "name": "Missing Authentication for Critical Functionality", "description": "The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context: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, accessing administrative or other privileged functionality, or possibly even executing arbitrary code.::", "mitigations": "::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, including those channels that are assumed to be accessible only by authorized parties. 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 submi"}
{"id": "CWE-307", "name": "Improper Restriction of Excessive Authentication Attempts", "description": "The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame.", "extended": "", "consequences": "::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 using a brute force attack.::", "mitigations": "::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 [REF-1482]. Consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator. [REF-45]::"}
{"id": "CWE-308", "name": "Use of Single-factor Authentication", "description": "The product uses an authentication algorithm that uses a single factor (e.g., a password) in a security context that should require more than one factor.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If the secret in a single-factor authentication scheme gets compromised, full authentication is possible.::", "mitigations": "::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. For this reason, if multiple schemes are possible, they should be implemented and required -- especially if they are easy to use.::"}
{"id": "CWE-309", "name": "Use of Password System for Primary Authentication", "description": "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.", "extended": "", "consequences": "::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.::", "mitigations": "::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"}
{"id": "CWE-312", "name": "Cleartext Storage of Sensitive Information", "description": "The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:An attacker with access to the system could read sensitive information stored in cleartext (i.e., unencrypted). 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.::", "mitigations": "::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]::PHASE:Implementation System Configuration Operation:DESCRIPTION: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.::"}
{"id": "CWE-319", "name": "Cleartext Transmission of Sensitive Information", "description": "The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.", "extended": "", "consequences": "::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. 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.::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Modify Files or Directories:IMPACT:Other:NOTE:When full communications are recorded or logged, such as with a packet dump, an adversary could attempt to obtain the dump long aft", "mitigations": "::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.::"}
{"id": "CWE-322", "name": "Key Exchange without Entity Authentication", "description": "The product performs a key exchange with an actor without verifying the identity of that actor.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:No authentication takes place in the key exchange process itself, bypassing an assumed protection of encryption. 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.::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.::", "mitigations": "::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.::"}
{"id": "CWE-323", "name": "Reusing a Nonce, Key Pair in Encryption", "description": "Nonces should be used for the present occasion and only once.", "extended": "", "consequences": "::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.::", "mitigations": "::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.::"}
{"id": "CWE-324", "name": "Use of a Key Past its Expiration Date", "description": "The product uses a cryptographic key past its expiration date.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:Using a key past its expiration data increases the timing window for cracking attacks against that key. Or, the key in question may be compromised, providing a malicious user with a method for authenticating as the victim.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Adequate consideration should be put into 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.::PHASE:Implementation:DESCRIPTION:Replace keys within a period of time proportional to their strength.::"}
{"id": "CWE-325", "name": "Missing Cryptographic Step", "description": "The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.", "extended": "", "consequences": "::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::", "mitigations": ""}
{"id": "CWE-328", "name": "Use of Weak Hash", "description": "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).", "extended": "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.", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": "::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::"}
{"id": "CWE-331", "name": "Insufficient Entropy", "description": "The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:An attacker could guess the random numbers generated and could gain unauthorized access to a system if the random numbers are used for authentication and authorization.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Determine the necessary entropy to adequately provide for randomness and predictability. This can be achieved by increasing the number of bits of objects such as keys and seeds.::"}
{"id": "CWE-334", "name": "Small Space of Random Values", "description": "The number of possible random values is smaller than needed by the product, making it more susceptible to brute force attacks.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:An attacker could easily guess the values used. This could lead to unauthorized access to a system if the seed is used for authentication and authorization.::", "mitigations": "::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::"}
{"id": "CWE-335", "name": "Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)", "description": "The product uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.", "extended": "PRNGs are deterministic and, while their output appears random, they cannot actually create entropy. They rely on cryptographically secure and unique seeds for entropy so proper seeding is critical to the secure operation of the PRNG. Management of seeds could be broken down into two main areas: (1) protecting seeds as cryptographic material (such as a cryptographic key); (2) whenever possible, using a uniquely generated seed from a cryptographically secure source PRNGs require a seed as input to generate a stream of numbers that are functionally indistinguishable from random numbers. While the output is, in many cases, sufficient for cryptographic uses, the output of any PRNG is directly determined by the seed provided as input. If the seed can be ascertained by a third party, the entire output of the PRNG can be made known to them. As such, the seed should be kept secret and should ideally not be able to be guessed. For example, the current time may be a poor seed. Knowing the approximate time the PRNG was seeded greatly reduces the possible key space. Seeds do not necessarily need to be unique, but reusing seeds may open up attacks if the seed is discovered.", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:If a PRNG is used incorrectly, such as using the same seed for each initialization or using a predictable seed, then an attacker may be able to easily guess the seed and thus the random numbers. This could lead to unauthorized access to a system if the seed is used for authentication and authorization.::", "mitigations": ""}
{"id": "CWE-338", "name": "Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)", "description": "The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.", "extended": "When a non-cryptographic PRNG is used in a cryptographic context, it can expose the cryptography to certain types of attacks. Often a pseudo-random number generator (PRNG) is not designed for cryptography. Sometimes a mediocre source of randomness is sufficient or preferable for algorithms that use random numbers. Weak generators generally take less processing power and/or do not use the precious, finite, entropy sources on a system. While such PRNGs might have very useful features, these same features could be used to break the cryptography.", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If a PRNG is used for authentication and authorization, such as a session ID or a seed for generating a cryptographic key, then an attacker may be able to easily guess the ID or cryptographic key and gain access to restricted functionality.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use functions or hardware which use a hardware-based random number generation for all crypto. This is the recommended solution. Use CyptGenRandom on Windows, or hw_rand() on Linux.::"}
{"id": "CWE-341", "name": "Predictable from Observable State", "description": "A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:This weakness could be exploited by an attacker in a number of ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing sensitive information, then an attacker might gain access to the system and may be able to gain access to the information in the file.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::"}
{"id": "CWE-342", "name": "Predictable Exact Value from Previous Values", "description": "An exact value or random number can be precisely predicted by observing previous values.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": "::PHASE::DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::"}
{"id": "CWE-343", "name": "Predictable Value Range from Previous Values", "description": "The product's random number generator produces a series of values which, when observed, can be used to infer a relatively small range of possibilities for the next value that could be generated.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:In some cases, an attacker cannot predict the exact value that will be produced next, but can narrow down the possibilities significantly. This reduces the amount of effort to perform a brute force attack.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:The output of a random number generator should not be predictable based on observations of previous values.::PHASE:Implementation:DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::"}
{"id": "CWE-344", "name": "Use of Invariant Value in Dynamically Changing Context", "description": "The product uses a constant value, name, or reference, but this value can (or should) vary across different environments.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-346", "name": "Origin Validation Error", "description": "The product does not properly verify that the source of data or communication is valid.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:NOTE:An attacker can access any functionality that is inadvertently accessible to the source.::", "mitigations": ""}
{"id": "CWE-347", "name": "Improper Verification of Cryptographic Signature", "description": "The product does not verify, or incorrectly verifies, the cryptographic signature for data.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Gain Privileges or Assume Identity:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could gain access to sensitive data and possibly execute unauthorized code.::", "mitigations": ""}
{"id": "CWE-348", "name": "Use of Less Trusted Source", "description": "The product has two different sources of the same data or information, but it uses the source that has less support for verification, is less trusted, or is less resistant to attack.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker could utilize the untrusted data source to bypass protection mechanisms and gain access to sensitive data.::", "mitigations": ""}
{"id": "CWE-349", "name": "Acceptance of Extraneous Untrusted Data With Trusted Data", "description": "The product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:IMPACT:Modify Application Data:NOTE:An attacker could package untrusted data with trusted data to bypass protection mechanisms to gain access to and possibly modify sensitive data.::", "mitigations": ""}
{"id": "CWE-351", "name": "Insufficient Type Distinction", "description": "The product does not properly distinguish between different types of elements in a way that leads to insecure behavior.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Other::", "mitigations": ""}
{"id": "CWE-353", "name": "Missing Support for Integrity Check", "description": "The product uses a transmission protocol that does not include a mechanism for verifying the integrity of the data during transmission, such as a checksum.", "extended": "The end-to-end philosophy of checks states that integrity checks should be performed at the lowest level that they can be completely implemented. Excluding further sanity checks and input validation performed by applications, the protocol's checksum is the most important level of checksum, since it can be performed more completely than at any previous level and takes into account entire messages, as opposed to single packets.", "consequences": "::SCOPE:Non-Repudiation:SCOPE:Integrity:SCOPE:Other:IMPACT:Other:IMPACT:Hide Activities:NOTE:If integrity check values or checksums are omitted from a protocol, there is no way of determining if data has been corrupted in transmission, i.e., it is impossible to determine if any changes have been made to the data after it was sent. The lack of checksum functionality in a protocol removes the first application-level check of data that can be used. Data that is parsed and used may be corrupted.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Add an appropriately sized checksum to the protocol, ensuring that data received may be simply validated before it is parsed and used.::PHASE:Implementation:DESCRIPTION:Ensure that the checksums present in the protocol design are properly implemented and added to each message before it is sent.::"}
{"id": "CWE-354", "name": "Improper Validation of Integrity Check Value", "description": "The product does not validate or incorrectly validates the integrity check values or checksums of a message.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Other:NOTE:Integrity checks usually use a secret key that helps authenticate the data origin. Skipping integrity checking generally opens up the possibility that new data from an invalid source can be injected.::SCOPE:Integrity:SCOPE:Other:IMPACT:Other:NOTE:Data that is parsed and used may be corrupted.::SCOPE:Non-Repudiation:SCOPE:Other:IMPACT:Hide Activities:IMPACT:Other:NOTE:Without a checksum check, it is impossible to determine if any changes have been made to the data after it was sent.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:The protocol specification describes the algorithm used for calculating the checksum. It is then a matter of implementing the calculation and verifying that the calculated checksum and the received checksum match.::"}
{"id": "CWE-356", "name": "Missing User Interaction for Potentially Unsafe Action", "description": "The product encounters a situation in which some of its behavior is security-critical and should be authorized by a human before progressing, but it does not properly consult with the human user or its proxy (such as UI approval dialogues or pre-set policies) to determine whether it is allowed to perform the potentially dangerous behavior.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:This makes it easier for attackers to trick users into inflicting damage to their system.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Product systems should warn users that a potentially dangerous action may occur if the user proceeds. For example, if the user downloads a file from an unknown source and attempts to execute the file on their machine, then the application's GUI can indicate that the file is unsafe.::"}
{"id": "CWE-357", "name": "Insufficient UI Warning of Dangerous Operations", "description": "The user interface provides a warning to a user regarding dangerous or sensitive operations, but the warning is not noticeable enough to warrant attention.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:IMPACT:Hide Activities::", "mitigations": ""}
{"id": "CWE-358", "name": "Improperly Implemented Security Check for Standard", "description": "The product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": ""}
{"id": "CWE-359", "name": "Exposure of Private Personal Information to an Unauthorized Actor", "description": "The product does not properly prevent a person's private, personal information from being accessed by actors who either (1) are not explicitly authorized to access the information or (2) do not have the implicit consent of the person about whom the information is collected.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Identify and consult all relevant regulations for personal privacy. An organization may be required to comply with certain federal and state regulations, depending on its location, the type of business it conducts, and the nature of any private data it handles. Regulations may include Safe Harbor Privacy Framework [REF-340], Gramm-Leach Bliley Act (GLBA) [REF-341], Health Insurance Portability and Accountability Act (HIPAA) [REF-342], General Data Protection Regulation (GDPR) [REF-1047], California Consumer Privacy Act (CCPA) [REF-1048], and others.::PHASE:Architecture and Design:DESCRIPTION:Carefully evaluate how secure design may interfere with privacy, and vice versa. Security and privacy concerns often seem to compete with each other. From a security perspective, all important operations should be recorded so that any anomalous activity can later be identified. However, when private data is involved, this practice can in fact create risk. Although there are many ways in which private data can be handled unsafely, a common risk stems from misplaced trust. Programmers often trust the operating environment in which a program runs, and therefore believe that it is acceptable store private information on the file system, in the registry, or in other locally-controlled resources. However, even if access to certain resources is restricted, this does not guarantee that the individuals who do have access can be trusted.::PHASE:Implementation Operat"}
{"id": "CWE-360", "name": "Trust of System Event Data", "description": "Security based on event locations are insecure and can be spoofed.", "extended": "Events are a messaging system that may provide control data to programs listening for events. Events often do not have any type of authentication framework to allow them to be verified from a trusted source. Any application, in Windows, on a given desktop can send a message to any window on the same desktop. There is no authentication framework for these messages. Therefore, any message can be used to manipulate any process on the desktop if the process does not check the validity and safeness of those messages.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Execute Unauthorized Code or Commands:NOTE:If one trusts the system-event information and executes commands based on it, one could potentially take actions based on a spoofed identity.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Never trust or rely on any of the information in an Event for security.::"}
{"id": "CWE-364", "name": "Signal Handler Race Condition", "description": "The product uses a signal handler that introduces a race condition.", "extended": "These issues occur when non-reentrant functions, or state-sensitive actions occur in the signal handler, where they may be called at any time. These behaviors can violate assumptions being made by the regular code that is interrupted, or by other signal handlers that may also be invoked. If these functions are called at an inopportune moment - such as while a non-reentrant function is already running - memory corruption could occur that may be exploitable for code execution. Another signal race condition commonly found occurs when free() is called within a signal handler, resulting in a double free and therefore a write-what-where condition. Even if a given pointer is set to NULL after it has been freed, a race condition still exists between the time the memory was freed and the pointer was set to NULL. This is especially problematic if the same signal handler has been set for more than one signal -- since it means that the signal handler itself may be reentered. There are several known behaviors related to signal handlers that have received the label of signal handler race condition: Shared state (e.g. global data or static variables) that are accessible to both a signal handler and regular code Shared state between a signal handler and other signal handlers Use of non-reentrant functionality within a signal handler - which generally implies that shared state is being used. For example, malloc() and free() are non-reentrant because they may use global or static data structures for managing memory, and they are indirectly used by innocent-seeming functions such as syslog(); these functions could be exploited for memory corruption and, possibly, code execution. Association of the same signal handler function with multiple signals - which might imply shared state, since the same code and resources are accessed. For example, this can be a source of double-free and use-after-free weaknesses. Use of setjmp and longjmp, or other mechanisms that prevent a signal handler fr", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:Modify Memory:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Execute Unauthorized Code or Commands:NOTE:Attackers may be able to exploit a signal handler race condition to cause the product state to be corrupted. It may be possible to execute arbitrary code by modifying global variables or data structures at unexpected times, violating the assumptions of code that uses this global data.::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:If a signal handler interrupts code that is executing with privileges, it may be possible that the signal handler will also be executed with elevated privileges, possibly making subsequent exploits more severe.::", "mitigations": "::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.::PHASE:Architecture and Design:DESCRIPTION:Design signal handlers to only set flags, rather than perform complex functionality. These flags can then be checked and acted upon within the main program loop.::PHASE:Implementation:DESCRIPTION:Only use reentrant functions within signal handlers. Also, use validation to ensure that state is consistent while performing asynchronous actions that affect the state of execution.::"}
{"id": "CWE-366", "name": "Race Condition within a Thread", "description": "If two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Unexpected State:NOTE:The main problem is that -- if a lock is overcome -- data could be altered in a bad state.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use locking functionality. This is the recommended solution. Implement some form of locking mechanism around code which alters or reads persistent data in a multithreaded environment.::PHASE:Architecture and Design:DESCRIPTION:Create resource-locking validation checks. If no inherent locking mechanisms exist, use flags and signals to enforce your own blocking scheme when resources are being used by other threads of execution.::"}
{"id": "CWE-367", "name": "Time-of-check Time-of-use (TOCTOU) Race Condition", "description": "The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Unexpected State:NOTE:The attacker can gain access to otherwise unauthorized resources.::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Modify Files or Directories:IMPACT:Modify Memory:IMPACT:Other:NOTE:Race conditions such as this kind may be employed to gain read or write access to resources which are not normally readable or writable by the user in question.::SCOPE:Integrity:SCOPE:Other:IMPACT:Other:NOTE:The resource in question, or other resources (through the corrupted one), may be changed in undesirable ways by a malicious user.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:If a file or other resource is written in this method, as opposed to in a valid way, logging of the activity may not occur.::SCOPE:Non-Repudiation:SCOPE:Other:IMPACT:Other:NOTE:In some cases it may be possible to delete files a malicious user might not otherwise have access to, such as log files.::SCOPE:Other:IMPACT:Unexp", "mitigations": "::PHASE:Implementation:DESCRIPTION:The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.::PHASE:Implementation:DESCRIPTION:When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.::PHASE:Architecture and Design:DESCRIPTION:Limit the interleaving of operations on files from multiple processes.::PHASE:Implementation Architecture and Design:DESCRIPTION:If you cannot perform operations atomically and you must share access to the resource between multiple processes or threads, then try to limit the amount of time (CPU cycles) between the check and use of the resource. This will not fix the problem, but it could make it more difficult for an attack to succeed.::PHASE:Implementation:DESCRIPTION:Recheck the resource after the use call to verify that the action was taken appropriately.::PHASE:Architecture and Design:DESCRIPTION:Ensure that some environmental locking mechanism can be used to protect resources effectively.::PHASE:Implementation:DESCRIPTION:Ensure that locking occurs before the check, as opposed to afterwards, such that the resource, as checked, is the same as it is when in use.::"}
{"id": "CWE-368", "name": "Context Switching Race Condition", "description": "A product performs a series of non-atomic actions to switch between contexts that cross privilege or other security boundaries, but a race condition allows an attacker to modify or misrepresent the product's behavior during the switch.", "extended": "This is commonly seen in web browser vulnerabilities in which the attacker can perform certain actions while the browser is transitioning from a trusted to an untrusted domain, or vice versa, and the browser performs the actions on one domain using the trust level and resources of the other domain.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Modify Application Data:IMPACT:Read Application Data::", "mitigations": ""}
{"id": "CWE-369", "name": "Divide By Zero", "description": "The product divides a value by zero.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:A Divide by Zero results in a crash.::", "mitigations": ""}
{"id": "CWE-372", "name": "Incomplete Internal State Distinction", "description": "The product does not properly determine which state it is in, causing it to assume it is in state X when in fact it is in state Y, causing it to perform incorrect operations in a security-relevant manner.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-374", "name": "Passing Mutable Objects to an Untrusted Method", "description": "The product sends non-cloned mutable data as an argument to a method or function.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Memory:NOTE:The function or method that has been called can alter or delete the mutable data. This could violate assumptions that the calling function has made about its state. In situations where unknown code is called with references to mutable data, this external code could make changes to the data sent. If this data was not previously cloned, the modified data might not be valid in the context of execution.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Pass in data which should not be altered as constant or immutable.::PHASE:Implementation:DESCRIPTION:Clone all mutable data before passing it into an external function . This is the preferred mitigation. This way, regardless of what changes are made to the data, a valid copy is retained for use by the class.::"}
{"id": "CWE-375", "name": "Returning a Mutable Object to an Untrusted Caller", "description": "The code sends non-cloned mutable data as a return value may result in that data being altered or deleted by the calling function.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:IMPACT:Modify Memory:NOTE:The muitable data could be altered or deleted by the calling function. If this data was not previously cloned, the class will then be using modified data which may violate assumptions about its internal state.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Declare returned data which should not be altered as constant or immutable.::PHASE:Implementation:DESCRIPTION:Clone all mutable data before returning references to it. This is the preferred mitigation. This way, regardless of what changes are made to the data, a valid copy is retained for use by the class.::"}
{"id": "CWE-378", "name": "Creation of Temporary File With Insecure Permissions", "description": "Opening temporary files without appropriate measures or controls can leave the file, its contents and any function that it impacts vulnerable to attack.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:If the temporary file can be read by the attacker, sensitive information may be in that file which could be revealed.::SCOPE:Authorization:SCOPE:Other:IMPACT:Other:NOTE:If that file can be written to by the attacker, the file might be moved into a place to which the attacker does not have access. This will allow the attacker to gain selective resource access-control privileges.::SCOPE:Integrity:SCOPE:Other:IMPACT:Other:NOTE:Depending on the data stored in the temporary file, there is the potential for an attacker to gain an additional input vector which is trusted as non-malicious. It may be possible to make arbitrary changes to data structures, user information, or even process ownership.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Many contemporary languages have functions which properly handle this condition. Older C temp file functions are especially susceptible.::PHASE:Implementation:DESCRIPTION:Ensure that you use proper file permissions. This can be achieved by using a safe temp file function. Temporary files should be writable and readable only by the process that owns the file.::PHASE:Implementation:DESCRIPTION:Randomize temporary file names. This can also be achieved by using a safe temp-file function. This will ensure that temporary files will not be created in predictable places.::"}
{"id": "CWE-379", "name": "Creation of Temporary File in Directory with Insecure Permissions", "description": "The product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:On some operating systems, the fact that the temporary file exists may be apparent to any user with sufficient privileges to access that directory. Since the file is visible, the application that is using the temporary file could be known. If one has access to list the processes on the system, the attacker has gained information about what the user is doing at that time. By correlating this with the applications the user is running, an attacker could potentially discover what a user's actions are. From this, higher levels of security could be breached.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Many contemporary languages have functions which properly handle this condition. Older C temp file functions are especially susceptible.::PHASE:Implementation:DESCRIPTION:Try to store sensitive tempfiles in a directory which is not world readable -- i.e., per-user directories.::PHASE:Implementation:DESCRIPTION:Avoid using vulnerable temp file functions.::"}
{"id": "CWE-385", "name": "Covert Timing Channel", "description": "Covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Other:IMPACT:Read Application Data:IMPACT:Other:NOTE:In some instances, knowing when data is transmitted between parties can provide a malicious user with privileged information. Also, externally monitoring the timing of operations can potentially reveal sensitive data. For example, a cryptographic operation can expose its internal state if the time it takes to perform the operation varies, based on the state.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Whenever possible, specify implementation strategies that do not introduce time variances in operations.::PHASE:Implementation:DESCRIPTION:Often one can artificially manipulate the time which operations take or -- when operations occur -- can remove information from the attacker.::PHASE:Implementation:DESCRIPTION:It is reasonable to add artificial or random delays so that the amount of CPU time consumed is independent of the action being taken by the application.::"}
{"id": "CWE-386", "name": "Symbolic Name not Mapping to Correct Object", "description": "A constant symbolic reference to an object is used, even though the reference can resolve to a different object over time.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:The attacker can gain access to otherwise unauthorized resources.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Modify Files or Directories:IMPACT:Read Application Data:IMPACT:Read Files or Directories:IMPACT:Other:NOTE:Race conditions such as this kind may be employed to gain read or write access to resources not normally readable or writable by the user in question.::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Other:NOTE:The resource in question, or other resources (through the corrupted one) may be changed in undesirable ways by a malicious user.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:If a file or other resource is written in this method, as opposed to a valid way, logging of the activity may not occur.::SCOPE:Non-Repudiation:SCOPE:Integrity:IMPACT:Modify Files or Directories:NOTE:In some cases it may be possible to delete files that a ma", "mitigations": ""}
{"id": "CWE-390", "name": "Detection of Error Condition Without Action", "description": "The product detects a specific error, but takes no actions to handle the error.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State:IMPACT:Alter Execution Logic:NOTE:An attacker could utilize an ignored error condition to place the system in an unexpected state that could lead to the execution of unintended logic and could cause other unintended behavior.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Properly handle each exception. This is the recommended solution. Ensure that all exceptions are handled in such a way that you can be sure of the state of your system at any given moment.::PHASE:Implementation:DESCRIPTION:If a function returns an error, it is important to either fix the problem and try again, alert the user that an error has happened and let the program continue, or alert the user and close and cleanup the program.::PHASE:Testing:DESCRIPTION:Subject the product to extensive testing to discover some of the possible instances of where/how errors or return values are not handled. Consider testing techniques such as ad hoc, equivalence partitioning, robustness and fault tolerance, mutation, and fuzzing.::"}
{"id": "CWE-391", "name": "DEPRECATED: Unchecked Error Condition", "description": "This entry has been deprecated because it used ambiguous terminology and incorporated and confused multiple weaknesses. See Mapping Notes for other recommendations, and see Maintenance Notes for more detailed explanations.", "extended": "", "consequences": "", "mitigations": ""}
{"id": "CWE-392", "name": "Missing Report of Error Condition", "description": "The product encounters an error but does not provide a status code or return value to indicate that an error has occurred.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State:NOTE:Errors that are not properly reported could place the system in an unexpected state that could lead to unintended behaviors.::", "mitigations": ""}
{"id": "CWE-393", "name": "Return of Wrong Status Code", "description": "A function or operation returns an incorrect return value or status code that does not indicate the true result of execution, causing the product to modify its behavior based on the incorrect result.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Unexpected State:IMPACT:Alter Execution Logic:NOTE:This weakness can lead to unpredictable behavior. If the function is used to make security-critical decisions or provide security-critical information, then the wrong status code can cause the product to assume that an action is safe or correct, even when it is not. This weakness could place the system in a state that could lead unexpected logic to be executed or other unintended behaviors.::", "mitigations": ""}
{"id": "CWE-394", "name": "Unexpected Status Code or Return Value", "description": "The product does not properly check when a function or operation returns a value that is legitimate for the function, but is not expected by the product.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Unexpected State:IMPACT:Alter Execution Logic::", "mitigations": ""}
{"id": "CWE-395", "name": "Use of NullPointerException Catch to Detect NULL Pointer Dereference", "description": "Catching NullPointerException should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU)::SCOPE:Other:IMPACT:Quality Degradation::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Do not extensively rely on catching exceptions (especially for validating user input) to handle errors. Handling exceptions can decrease the performance of an application.::"}
{"id": "CWE-396", "name": "Declaration of Catch for Generic Exception", "description": "Catching overly broad exceptions promotes complex error handling code that is more likely to contain security vulnerabilities.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:SCOPE:Other:IMPACT:Hide Activities:NOTE:Multiple catch blocks can get ugly and repetitive, but condensing catch blocks by catching a high-level class like Exception can obscure exceptions that deserve special treatment or that should not be caught at this point in the program. Catching an overly broad exception essentially defeats the purpose of a language's typed exceptions, and can become particularly dangerous if the program grows and begins to throw new types of exceptions. The new exception types will not receive any attention. A generic exception can hide details about unexpected adversary activities by making it difficult to properly troubleshoot error conditions during execution.::", "mitigations": ""}
{"id": "CWE-397", "name": "Declaration of Throws for Generic Exception", "description": "The product throws or raises an overly broad exception that can hide important details and produce inappropriate responses to certain conditions.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:SCOPE:Other:IMPACT:Hide Activities:IMPACT:Alter Execution Logic:NOTE:Declaring a method to throw Exception or Throwable promotes generic error handling procedures that make it difficult for callers to perform proper error handling and error recovery. For example, Java's exception mechanism makes it easy for callers to anticipate what can go wrong and write code to handle each specific exceptional circumstance. Throwing a generic exception can hide details about unexpected adversary activities by making it difficult to properly troubleshoot error conditions during execution.::", "mitigations": ""}
{"id": "CWE-403", "name": "Exposure of File Descriptor to Unintended Control Sphere", "description": "A process does not close sensitive file descriptors before invoking a child process, which allows the child to perform unauthorized I/O operations using those descriptors.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::", "mitigations": ""}
{"id": "CWE-408", "name": "Incorrect Behavior Order: Early Amplification", "description": "The product allows an entity to perform a legitimate but expensive operation before authentication or authorization has taken place.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Amplification:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):NOTE:System resources, CPU and memory, can be quickly consumed. This can lead to poor system performance or system crash.::", "mitigations": ""}
{"id": "CWE-409", "name": "Improper Handling of Highly Compressed Data (Data Amplification)", "description": "The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Amplification:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):NOTE:System resources, CPU and memory, can be quickly consumed. This can lead to poor system performance or system crash.::", "mitigations": ""}
{"id": "CWE-410", "name": "Insufficient Resource Pool", "description": "The product's resource pool is not large enough to handle peak demand.", "extended": "", "consequences": "::SCOPE:Availability:SCOPE:Integrity:SCOPE:Other:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Other:NOTE:An attacker can prevent others from accessing the resource by using a (relatively) large number of requests for resources using a flood of connection or sessions.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Do not perform resource-intensive transactions for unauthenticated users and/or invalid requests.::PHASE:Architecture and Design:DESCRIPTION:Consider implementing a velocity check mechanism which would detect abusive behavior.::PHASE:Operation:DESCRIPTION:Consider load balancing as an option to handle heavy loads.::PHASE:Implementation:DESCRIPTION:Make sure that resource handles are properly closed when no longer needed.::PHASE:Architecture and Design:DESCRIPTION:Identify the system's resource intensive operations and consider protecting them from abuse (e.g. malicious automated script which runs the resources out).::"}
{"id": "CWE-412", "name": "Unrestricted Externally Accessible Lock", "description": "The product properly checks for the existence of a lock, but the lock can be externally controlled or influenced by an actor that is outside of the intended sphere of control.", "extended": "This prevents the product from acting on associated resources or performing other behaviors that are controlled by the presence of the lock. Relevant locks might include an exclusive lock or mutex, or modifying a shared resource that is treated as a lock. If the lock can be held for an indefinite period of time, then the denial of service could be permanent.", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):NOTE:When an attacker can control a lock, the program may wait indefinitely until the attacker releases the lock, causing a denial of service to other users of the program. This is especially problematic if there is a blocking operation on the lock.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Use any access control that is offered by the functionality that is offering the lock.::PHASE:Architecture and Design Implementation:DESCRIPTION:Use unpredictable names or identifiers for the locks. This might not always be possible or feasible.::PHASE:Architecture and Design:DESCRIPTION:Consider modifying your code to use non-blocking synchronization methods.::"}
{"id": "CWE-413", "name": "Improper Resource Locking", "description": "The product must have exclusive access to a resource, but it does not lock or does not correctly lock that resource.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:DoS: Instability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:When a resource is not properly locked, an attacker could modify the resource while it is being operated on by the product. This might violate the product's assumption that the resource will not change, potentially leading to unexpected behaviors.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use a non-conflicting privilege scheme.::PHASE:Architecture and Design Implementation:DESCRIPTION:Use synchronization when locking a resource.::"}
{"id": "CWE-414", "name": "Missing Lock Check", "description": "A product does not check to see if a lock is present before performing sensitive operations on a resource.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:DoS: Instability:IMPACT:DoS: Crash, Exit, or Restart::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Implement a reliable lock mechanism.::"}
{"id": "CWE-419", "name": "Unprotected Primary Channel", "description": "The product uses a primary channel for administration or restricted functionality, but it does not properly protect the channel.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Do not expose administrative functionality on the user UI.::PHASE:Architecture and Design:DESCRIPTION:Protect the administrative/restricted functionality with a strong authentication mechanism.::"}
{"id": "CWE-420", "name": "Unprotected Alternate Channel", "description": "The product protects a primary channel, but it does not use the same level of protection for an alternate channel.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Identify all alternate channels and use the same protection mechanisms that are used for the primary channels.::"}
{"id": "CWE-421", "name": "Race Condition During Access to Alternate Channel", "description": "The product opens an alternate channel to communicate with an authorized user, but the channel is accessible to other actors.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:NOTE:This creates a race condition that allows an attacker to access the channel before the authorized user does.::", "mitigations": ""}
{"id": "CWE-425", "name": "Direct Request", "description": "The web application does not adequately enforce appropriate authorization on all restricted URLs, scripts, or files.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Gain Privileges or Assume Identity::", "mitigations": "::PHASE:Architecture and Design Operation:DESCRIPTION:Apply appropriate access control authorizations for each access to all restricted URLs, scripts or files.::PHASE:Architecture and Design:DESCRIPTION:Consider using MVC based frameworks such as Struts.::"}
{"id": "CWE-426", "name": "Untrusted Search Path", "description": "The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.", "extended": "Some of the most common variants of untrusted search path are: In various UNIX and Linux-based systems, the PATH environment variable may be consulted to locate executable programs, and LD_PRELOAD may be used to locate a separate library. Programming languages may have their own paths for locating code, e.g. PERL5LIB in Perl. In various Microsoft-based systems, the PATH environment variable is consulted to locate a DLL, if the DLL is not found in other paths that appear earlier in the search order.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Execute Unauthorized Code or Commands:NOTE:There is the potential for arbitrary code execution with privileges of the vulnerable program. If the product uses a search path to locate critical resources such as programs or libraries, then an attacker could modify that search path to point to a malicious program/library, which the targeted product would then execute.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:The program could be redirected to the wrong files, potentially triggering a crash or hang when the targeted file is too large or does not have the expected format.::SCOPE:Confidentiality:IMPACT:Read Files or Directories:NOTE:The program could access unauthorized data and send the output of unauthorized files to the attacker.::SCOPE:Other:IMPACT:Varies by Context:NOTE:The problem extends to any type of critical resource that the product tr", "mitigations": "::PHASE:Architecture and Design Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.::PHASE:Implementation:DESCRIPTION:When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.::PHASE:Implementation:DESCRIPTION:Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.::PHASE:Implementation:DESCRIPTION:Check your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory.::PHASE:Implementation:DESCRIPTION:Use other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe wa"}
{"id": "CWE-427", "name": "Uncontrolled Search Path Element", "description": "The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.", "extended": "Although this weakness can occur with any type of resource, it is frequently introduced when a product uses a directory search path to find executables or code libraries, but the path contains a directory that can be modified by an attacker, such as /tmp or the current working directory. In Windows-based systems, when the LoadLibrary or LoadLibraryEx function is called with a DLL name that does not contain a fully qualified path, the function follows a search order that includes two path elements that might be uncontrolled: the directory from which the program has been loaded the current working directory In some cases, the attack can be conducted remotely, such as when SMB or WebDAV network shares are used. One or more locations in that path could include the Windows drive root or its subdirectories. This often exists in Linux-based code assuming the controlled nature of the root directory (/) or its subdirectories (/etc, etc), or a code that recursively accesses the parent directory. In Windows, the drive root and some of its subdirectories have weak permissions by default, which makes them uncontrolled. In some Unix-based systems, a PATH might be created that contains an empty element, e.g. by splicing an empty variable into the PATH. This empty element can be interpreted as equivalent to the current working directory, which might be an untrusted search element. In software package management frameworks (e.g., npm, RubyGems, or PyPi), the framework may identify dependencies on third-party libraries or other packages, then consult a repository that contains the desired package. The framework may search a public repository before a private repository. This could be exploited by attackers by placing a malicious package in the public repository that has the same name as a package from the private repository. The search path might not be directly under control of the developer relying on the framework, but this search order effectively contains an untrusted element.", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands::", "mitigations": "::PHASE:Architecture and Design Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.::PHASE:Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.::PHASE:Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.::PHASE:Implementation:DESCRIPTION:Check your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory. Since this is a denylist approach, it might not be a complete solution.::PHASE:Implementation:DESCRIPTION:Use othe"}
{"id": "CWE-428", "name": "Unquoted Search Path or Element", "description": "The product uses a search path that contains an unquoted element, in which the element contains whitespace or other separators. This can cause the product to access resources in a parent path.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:If a malicious individual has access to the file system, it is possible to elevate privileges by inserting such a file as C:Program.exe to be run by a privileged program making use of WinExec.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Properly quote the full search path before executing a program on 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 tha"}
{"id": "CWE-430", "name": "Deployment of Wrong Handler", "description": "The wrong handler is assigned to process an object or request.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State:NOTE:An example of deploying the wrong handler would be calling a servlet to reveal source code of a .JSP file, or::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Perform a type check before interpreting an object.::PHASE:Architecture and Design:DESCRIPTION:Reject any inconsistent types, such as a file with a .GIF extension that appears to consist of PHP code.::"}
{"id": "CWE-431", "name": "Missing Handler", "description": "A handler is not available or implemented.", "extended": "When an exception is thrown and not caught, the process has given up an opportunity to decide if a given failure or event is worth a change in execution.", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Handle all possible situations (e.g. error condition).::PHASE:Implementation:DESCRIPTION:If an operation can throw an Exception, implement a handler for that specific exception.::"}
{"id": "CWE-434", "name": "Unrestricted Upload of File with Dangerous Type", "description": "The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:Arbitrary code execution is possible if an uploaded file is interpreted and executed as code by the recipient. This is especially true for web-server extensions such as .asp and .php because these file types are often treated as automatically executable, even when file system permissions do not specify execution. For example, in Unix environments, programs typically cannot run unless the execute bit is set, but PHP programs may be executed by the web server without directly invoking them on the operating system.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]::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:DESCRIPTION:Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]::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 exc"}
{"id": "CWE-437", "name": "Incomplete Model of Endpoint Features", "description": "A product acts as an intermediary or monitor between two or more endpoints, but it does not have a complete model of an endpoint's features, behaviors, or state, potentially causing the product to perform incorrect actions based on this incomplete model.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Unexpected State:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-439", "name": "Behavioral Change in New Version or Environment", "description": "A's behavior or functionality changes with a new version of A, or a new environment, which is not known (or manageable) by B.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-440", "name": "Expected Behavior Violation", "description": "A feature, API, or function does not perform according to its specification.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-444", "name": "Inconsistent Interpretation of HTTP Requests", "description": "The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.", "extended": "HTTP requests or responses (messages) can be malformed or unexpected in ways that cause web servers or clients to interpret the messages in different ways than intermediary HTTP agents such as load balancers, reverse proxies, web caching proxies, application firewalls, etc. For example, an adversary may be able to add duplicate or different header fields that a client or server might interpret as one set of messages, whereas the intermediary might interpret the same sequence of bytes as a different set of messages. For example, discrepancies can arise in how to handle duplicate headers like two Transfer-encoding (TE) or two Content-length (CL), or the malicious HTTP message will have different headers for TE and CL. The inconsistent parsing and interpretation of messages can allow the adversary to smuggle a message to the client/server without the intermediary being aware of it. This weakness is usually the result of the usage of outdated or incompatible HTTP protocol versions in the HTTP agents.", "consequences": "::SCOPE:Integrity:SCOPE:Non-Repudiation:SCOPE:Access Control:IMPACT:Unexpected State:IMPACT:Hide Activities:IMPACT:Bypass Protection Mechanism:NOTE:An attacker could create HTTP messages to exploit a number of weaknesses including 1) the message can trick the web server to associate a URL with another URL's webpage and caching the contents of the webpage (web cache poisoning attack), 2) the message can be structured to bypass the firewall protection mechanisms and gain unauthorized access to a web application, and 3) the message can invoke a script or a page that returns client credentials (similar to a Cross Site Scripting attack).::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use a web server that employs a strict HTTP parsing procedure, such as Apache [REF-433].::PHASE:Implementation:DESCRIPTION:Use only SSL communication.::PHASE:Implementation:DESCRIPTION:Terminate the client session after each request.::PHASE:System Configuration:DESCRIPTION:Turn all pages to non-cacheable.::"}
{"id": "CWE-447", "name": "Unimplemented or Unsupported Feature in UI", "description": "A UI function for a security feature appears to be supported and gives feedback to the user that suggests that it is supported, but the underlying functionality is not implemented.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:IMPACT:Unexpected State::", "mitigations": "::PHASE:Testing:DESCRIPTION:Perform functionality testing before deploying the application.::"}
{"id": "CWE-448", "name": "Obsolete Feature in UI", "description": "A UI function is obsolete and the product does not warn the user.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Remove the obsolete feature from the UI. Warn the user that the feature is no longer supported.::"}
{"id": "CWE-449", "name": "The UI Performs the Wrong Action", "description": "The UI performs the wrong action with respect to the user's request.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-454", "name": "External Initialization of Trusted Variables or Data Stores", "description": "The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:If an attacker can initialize the variable incorrectly, this can influence what the product will do. The attacker could gain access to and modify sensitive data or system information.::", "mitigations": "::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:A product system should be reluctant to trust variables that have been initialized outside of its trust boundary, especially if they are initialized by users. Ensure adequate checking (e.g. input validation) is performed when relying on input from outside a trust boundary.::PHASE:Architecture and Design:DESCRIPTION:Avoid any external control of variables. If necessary, restrict the variables that can be modified using an allowlist, and use a different namespace or naming convention if possible.::"}
{"id": "CWE-455", "name": "Non-exit on Failed Initialization", "description": "The product does not exit or otherwise modify its operation when security-relevant errors occur during initialization, such as when a configuration file has a format error or a hardware security module (HSM) cannot be activated, which can cause the product to execute in a less secure fashion than intended by the administrator.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Alter Execution Logic:NOTE:The application could be placed in an insecure state that may allow an attacker to modify sensitive data or allow unintended logic to be executed.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Follow the principle of failing securely when an error occurs. The system should enter a state where it is not vulnerable and will not display sensitive error messages to a potential attacker.::"}
{"id": "CWE-459", "name": "Incomplete Cleanup", "description": "The product does not properly clean up and remove temporary or supporting resources after they have been used.", "extended": "", "consequences": "::SCOPE:Other:SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Other:IMPACT:Read Application Data:IMPACT:Modify Application Data:IMPACT:DoS: Resource Consumption (Other):NOTE:It is possible to overflow the number of temporary files because directories typically have limits on the number of files allowed. This could create a denial of service problem.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Temporary files and other supporting resources should be deleted/released immediately after they are no longer needed.::"}
{"id": "CWE-463", "name": "Deletion of Data Structure Sentinel", "description": "The accidental deletion of a data-structure sentinel can cause serious programming logic problems.", "extended": "Often times data-structure sentinels are used to mark structure of the data structure. A common example of this is the null character at the end of strings. Another common example is linked lists which may contain a sentinel to mark the end of the list. It is dangerous to allow this type of control data to be easily accessible. Therefore, it is important to protect from the deletion or modification outside of some wrapper interface which provides safety.", "consequences": "::SCOPE:Availability:SCOPE:Other:IMPACT:Other:NOTE:Generally this error will cause the data structure to not work properly.::SCOPE:Authorization:SCOPE:Other:IMPACT:Other:NOTE:If a control character, such as NULL is removed, one may cause resource access control problems.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use an abstraction library to abstract away risky APIs. Not a complete solution.::PHASE:Build and Compilation:STRATEGY:Compilation or Build Hardening:DESCRIPTION:Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows. For example, certain compilers and extensions provide automatic buffer overflow detection mechanisms that are built into the compiled code. Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.:EFFECTIVENESS:Defense in Depth::PHASE:Operation:DESCRIPTION:Use OS-level preventative functionality. Not a complete solution.::"}
{"id": "CWE-464", "name": "Addition of Data Structure Sentinel", "description": "The accidental addition of a data-structure sentinel can cause serious programming logic problems.", "extended": "Data-structure sentinels are often used to mark the structure of data. A common example of this is the null character at the end of strings or a special sentinel to mark the end of a linked list. It is dangerous to allow this type of control data to be easily accessible. Therefore, it is important to protect from the addition or modification of sentinels.", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:Generally this error will cause the data structure to not work properly by truncating the data.::", "mitigations": "::PHASE:Implementation Architecture and Design:DESCRIPTION:Encapsulate the user from interacting with data sentinels. Validate user input to verify that sentinels are not present.::PHASE:Implementation:DESCRIPTION:Proper error checking can reduce the risk of inadvertently introducing sentinel values into data. For example, if a parsing function fails or encounters an error, it might return a value that is the same as the sentinel.::PHASE:Architecture and Design:DESCRIPTION:Use an abstraction library to abstract away risky APIs. This is not a complete solution.::PHASE:Operation:DESCRIPTION:Use OS-level preventative functionality. This is not a complete solution.::"}
{"id": "CWE-466", "name": "Return of Pointer Value Outside of Expected Range", "description": "A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Memory:IMPACT:Modify Memory::", "mitigations": ""}
{"id": "CWE-468", "name": "Incorrect Pointer Scaling", "description": "In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Memory:IMPACT:Modify Memory:NOTE:Incorrect pointer scaling will often result in buffer overflow conditions. Confidentiality can be compromised if the weakness is in the context of a buffer over-read or under-read.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use a platform with high-level memory abstractions.::PHASE:Implementation:DESCRIPTION:Always use array indexing instead of direct pointer manipulation.::PHASE:Architecture and Design:DESCRIPTION:Use technologies for preventing buffer overflows.::"}
{"id": "CWE-469", "name": "Use of Pointer Subtraction to Determine Size", "description": "The product subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Memory:IMPACT:Read Memory:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Gain Privileges or Assume Identity:NOTE:There is the potential for arbitrary code execution with privileges of the vulnerable program.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Save an index variable. This is the recommended solution. Rather than subtract pointers from one another, use an index variable of the same size as the pointers in question. Use this variable to walk from one pointer to the other and calculate the difference. Always validate this number.::"}
{"id": "CWE-470", "name": "Use of Externally-Controlled Input to Select Classes or Code", "description": "The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.", "extended": "An attacker could supply values to select unexpected classes or methods. If this occurs, then the attacker could create control flow paths that were not intended by the developer. These paths could bypass authentication or access control checks, or otherwise cause the product to behave in an unexpected manner. This situation becomes a doomsday scenario if the attacker can upload files into a location that appears on the product's classpath (CWE-427) or add new entries to the product's classpath (CWE-426). Under either of these conditions, the attacker can use reflection to introduce new, malicious behavior into the product.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Other:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Alter Execution Logic:NOTE:The attacker might be able to execute code that is not directly accessible to the attacker. Alternately, the attacker could call unexpected code in the wrong place or the wrong time, possibly modifying critical system state.::SCOPE:Availability:SCOPE:Other:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Other:NOTE:The attacker might be able to use reflection to call the wrong code, possibly with unexpected arguments that violate the API (CWE-227). This could cause the product to exit or hang.::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:By causing the wrong code to be invoked, the attacker might be able to trigger a runtime error that leaks sensitive information in the error message, such as CWE-536.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Refactor your code to avoid using reflection.::PHASE:Architecture and Design:DESCRIPTION:Do not use user-controlled inputs to select and load classes or code.::PHASE:Implementation:DESCRIPTION:Apply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.::"}
{"id": "CWE-472", "name": "External Control of Assumed-Immutable Web Parameter", "description": "The web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields.", "extended": "For example, custom cookies commonly store session data or persistent data across sessions. This kind of session data is normally involved in security related decisions on the server side, such as user authentication and access control. Thus, the cookies might contain sensitive data such as user credentials and privileges. This is a dangerous practice, as it can often lead to improper reliance on the value of the client-provided cookie by the server side application.", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:Without appropriate protection mechanisms, the client can easily tamper with cookies and similar web data. Reliance on the cookies without detailed validation can lead to problems such as SQL injection. If you use cookie values for security related decisions on the server side, manipulating the cookies might lead to violations of security policies such as authentication bypassing, user impersonation and privilege escalation. In addition, storing sensitive data in the cookie without appropriate protection can also lead to disclosure of sensitive user data, especially data stored in persistent cookies.::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:NOTE:If cookie values are used for security related decisions on the server side, manipulating the cookies might lead to violations of security policies such as authentication bypassing, user impersonation, and privilege escalation.::SCOPE:Confidentiality:IMPACT:Read Application Data:N", "mitigations": "::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 "}
{"id": "CWE-474", "name": "Use of Function with Inconsistent Implementations", "description": "The code uses a function that has inconsistent implementations across operating systems and versions.", "extended": "The implementation of many functions varies by platform, and at times, even by different versions of the same platform. Implementation differences can include: Slight differences in the way parameters are interpreted, leading to inconsistent results. Some implementations of the function carry significant security risks. The function might not be defined on all platforms. The function might change which return codes it can provide, or change the meaning of its return codes.", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context:NOTE:The use of inconsistent implementations can cause changes in behavior when the code is ported or built under a different environment than the programmer expects, which can lead to security problems in some cases.::", "mitigations": "::PHASE:Architecture and Design Requirements:DESCRIPTION:Do not accept inconsistent behavior from the API specifications when the deviant behavior increases the risk level.::"}
{"id": "CWE-475", "name": "Undefined Behavior for Input to API", "description": "The behavior of this function is undefined unless its control parameter is set to a specific value.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-476", "name": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:NULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented. Even when exception handling is being used, it can still be very difficult to return the software to a safe state of operation.::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Read Memory:IMPACT:Modify Memory:NOTE:In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].::PHASE:Requirements:DESCRIPTION:Select a programming language that is not susceptible to these issues.::PHASE:Implementation:DESCRIPTION:Check the results of all functions that return a value and verify that the value is non-null before acting upon it.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design:DESCRIPTION:Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.::PHASE:Implementation:DESCRIPTION:Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.::"}
{"id": "CWE-477", "name": "Use of Obsolete Function", "description": "The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.", "extended": "As programming languages evolve, functions occasionally become obsolete due to: Advances in the language Improved understanding of how operations should be performed effectively and securely Changes in the conventions that govern certain operations Functions that are removed are usually replaced by newer counterparts that perform the same task in some different and hopefully improved way.", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Refer to the documentation for the obsolete function in order to determine why it is deprecated or obsolete and to learn about alternative ways to achieve the same functionality.::PHASE:Requirements:DESCRIPTION:Consider seriously the security implications of using an obsolete function. Consider using alternate functions.::"}
{"id": "CWE-478", "name": "Missing Default Case in Multiple Condition Expression", "description": "The code does not have a default case in an expression with multiple conditions, such as a switch statement.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Varies by Context:IMPACT:Alter Execution Logic:NOTE:If a multiple-condition expression (such as a switch in C) omits the default case but does not consider or handle all possible values that could occur, then this might lead to complex logical errors and resultant weaknesses. Because of this, further decisions are made based on poor information, and cascading failure results. Depending on the context in which the expression is used, any consequences may result: e.g., issues of confidentiality, authentication, authorization, availability, integrity, accountability, or non-repudiation.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that there are no cases unaccounted for when adjusting program flow or values based on the value of a given variable. In the case of switch style statements, the very simple act of creating a default case can, if done correctly, mitigate this situation. Often however, the default case is used simply to represent an assumed option, as opposed to working as a check for invalid input. This is poor practice and in some cases is as bad as omitting a default case entirely.::"}
{"id": "CWE-480", "name": "Use of Incorrect Operator", "description": "The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Alter Execution Logic:NOTE:This weakness can cause unintended logic to be executed and other unexpected application behavior.::", "mitigations": ""}
{"id": "CWE-483", "name": "Incorrect Block Delimitation", "description": "The code does not explicitly delimit a block that is intended to contain 2 or more statements.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Alter Execution Logic:NOTE:This is a general logic error that will often lead to obviously-incorrect behaviors that are quickly noticed and fixed. In lightly tested or untested code, this error may be introduced it into a production environment and provide additional attack vectors by creating a control flow path leading to an unexpected state in the application. The consequences will depend on the types of behaviors that are being incorrectly executed.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Always use explicit block delimitation and use static-analysis technologies to enforce this practice.::"}
{"id": "CWE-484", "name": "Omitted Break Statement in Switch", "description": "The product omits a break statement within a switch or similar construct, causing code associated with multiple conditions to execute. This can cause problems when the programmer only intended to execute code associated with one condition.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Alter Execution Logic:NOTE:This weakness can cause unintended logic to be executed and other unexpected application behavior. It can lead to critical code executing in situations where it should not.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Omitting a break statement so that one may fall through is often indistinguishable from an error, and therefore should be avoided. If you need to use fall-through capabilities, make sure that you have clearly documented this within the switch statement, and ensure that you have examined all the logical possibilities.::PHASE:Implementation:DESCRIPTION:The functionality of omitting a break statement could be clarified with an if statement. This method is much safer.::"}
{"id": "CWE-487", "name": "Reliance on Package-level Scope", "description": "Java packages are not inherently closed; therefore, relying on them for code security is not a good practice.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Any data in a Java package can be accessed outside of the Java framework if the package is distributed.::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:The data in a Java class can be modified by anyone outside of the Java framework if the package is distributed.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Data should be private static and final whenever possible. This will assure that your code is protected by instantiating early, preventing access and tampering.::"}
{"id": "CWE-488", "name": "Exposure of Data Element to Wrong Session", "description": "The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Data can bleed from one session to another through member variables of singleton objects, such as Servlets, and objects from a shared pool. Storing user data in Servlet member fields introduces a data access race condition.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Protect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.::PHASE:Testing:DESCRIPTION:Use a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).::PHASE:Architecture and Design:DESCRIPTION:In a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.::"}
{"id": "CWE-489", "name": "Active Debug Code", "description": "The product is released with debugging code still enabled or active.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Read Application Data:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:NOTE:Active debug code can create unintended entry points or expose sensitive information. The severity of the exposed debug code will depend on the particular instance. At the least, it will give an attacker sensitive information about the settings and mechanics of web applications on the server. At worst, as is often the case, the debug code will allow an attacker complete control over the web application and server, as well as confidential information that is accessed by either of these.::", "mitigations": "::PHASE:Build and Compilation Distribution:DESCRIPTION:Remove debug code before deploying the application.::"}
{"id": "CWE-494", "name": "Download of Code Without Integrity Check", "description": "The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Availability:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Alter Execution Logic:IMPACT:Other:NOTE:An attacker can execute malicious code by compromising the host server, performing DNS spoofing, or modifying the code in transit. Executing untrusted code could compromise the control flow of the program. The untrusted code could execute attacker-controlled commands, read or modify sensitive resources, or prevent the software from functioning correctly for legitimate users.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Perform proper forward and reverse DNS lookups to detect DNS spoofing.::PHASE:Architecture and Design Operation:DESCRIPTION:Encrypt the code with a reliable encryption scheme before transmitting.::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 [REF-1482]. Speficially, it may be helpful to use tools or frameworks to perform integrity checking on the transmitted code. When providing the code that is to be downloaded, such as for automatic updates of the software, then use cryptographic signatures for the code and modify the download clients to verify the signatures. Ensure that the implementation does not contain CWE-295, CWE-320, CWE-347, and related weaknesses. Use code signing technologies such as Authenticode. See references [REF-454] [REF-455] [REF-456].::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 operati"}
{"id": "CWE-497", "name": "Exposure of Sensitive System Information to an Unauthorized Control Sphere", "description": "The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:An information exposure occurs when system data or debugging information leaves the program through an output stream or logging function that makes it accessible to unauthorized parties. Debugging information helps an adversary learn about the system and form an attack plan. Using other weaknesses, an attacker could cause errors to occur; the response to these errors can reveal detailed system information, along with other impacts. An attacker can use messages that reveal technologies, operating systems, and product versions to tune the attack against known vulnerabilities in these technologies.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:Production applications should never use methods that generate internal details such as stack traces and error messages unless that information is directly committed to a log that is not viewable by the end user. All error message text should be HTML entity encoded before being written to the log file to protect against potential cross-site scripting attacks against the viewer of the logs::"}
{"id": "CWE-501", "name": "Trust Boundary Violation", "description": "The product mixes trusted and untrusted data in the same data structure or structured message.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": ""}
{"id": "CWE-502", "name": "Deserialization of Untrusted Data", "description": "The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:IMPACT:Unexpected State:NOTE:Attackers can modify unexpected objects or data that was assumed to be safe from modification. Deserialized data or code could be modified without using the provided accessor functions, or unexpected functions could be invoked.::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):NOTE:If a function is making an assumption on when to terminate, based on a sentry in a string, it could easily never terminate.::SCOPE:Other:IMPACT:Varies by Context:NOTE:The consequences can vary widely, because it depends on which objects or methods are being deserialized, and how they are used. Making an assumption that the code in the deserialized object is valid is dangerous and can enable exploitation. One example is attackers using gadget chains to perform unauthorized actions, such as generating a shell.::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.::PHASE:Implementation:DESCRIPTION:When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.::PHASE:Implementation:DESCRIPTION:Explicitly define a final object() to prevent deserialization.::PHASE:Architecture and Design Implementation:DESCRIPTION:Make fields transient to protect them from deserialization. An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.::PHASE:Implementation:DESCRIPTION:Avoid having unnecessary types or gadgets (a sequence of instances and method invocations that can self-execute during the deserialization process, often found in libraries) available that can be leveraged for malicious ends. This limits the potential for unintended or unauthorized types and gadgets to be leveraged by the attacker. Add only acceptable classes to an allowlist. Note: new gadgets are constantly being discovered, so this alone is not a sufficient mit"}
{"id": "CWE-515", "name": "Covert Storage Channel", "description": "A covert storage channel transfers information through the setting of bits by one program and the reading of those bits by another. What distinguishes this case from that of ordinary operation is that the bits are used to convey encoded information.", "extended": "Covert storage channels occur when out-of-band data is stored in messages for the purpose of memory reuse. Covert channels are frequently classified as either storage or timing channels. Examples would include using a file intended to hold only audit information to convey user passwords--using the name of a file or perhaps status bits associated with it that can be read by all users to signal the contents of the file. Steganography - concealing information in such a manner that no one but the intended recipient knows of the existence of the message - is a good example of a covert storage channel.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Covert storage channels may provide attackers with important information about the system in question.::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:If these messages or packets are sent with unnecessary data contained within, it may tip off malicious listeners as to the process that created the message. With this information, attackers may learn any number of things, including the hardware platform, operating system, or algorithms used by the sender. This information can be of significant value to the user in launching further attacks.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that all reserved fields are set to zero before messages are sent and that no unnecessary information is included.::"}
{"id": "CWE-521", "name": "Weak Password Requirements", "description": "The product does not require that users should have strong passwords.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker could easily guess user passwords and gain access user accounts.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:A product's design should require adherence to an appropriate password policy. Specific password requirements depend strongly on contextual factors, but it is recommended to contain the following attributes: Enforcement of a minimum and maximum length Restrictions against password reuse Restrictions against using common passwords Restrictions against using contextual string in the password (e.g., user id, app name) Depending on the threat model, the password policy may include several additional attributes. Complex passwords requiring mixed character sets (alpha, numeric, special, mixed case) Increasing the range of characters makes the password harder to crack and may be appropriate for systems relying on single factor authentication. Unfortunately, a complex password may be difficult to memorize, encouraging a user to select a short password or to incorrectly manage the password (write it down). Another disadvantage of this approach is that it often does not result in a significant increase in overall password complexity due to people's predictable usage of various symbols. Large Minimum Length (encouraging passphrases instead of passwords) Increasing the number of characters makes the password harder to crack and may be appropriate for systems relying on single factor authentication. A disadvantage of this approach is that selecting a good passphrase is not easy and poor passwords can still be generated. Some prompting may be nee"}
{"id": "CWE-523", "name": "Unprotected Transport of Credentials", "description": "Login pages do not use adequate measures to protect the user name and password while they are in transit from the client to the server.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity::", "mitigations": "::PHASE:Operation System Configuration:DESCRIPTION:Enforce SSL use for the login page or any page used to transmit user credentials or other sensitive information. Even if the entire site does not use SSL, it MUST use SSL for login. Additionally, to help prevent phishing attacks, make sure that SSL serves the login page. SSL allows the user to verify the identity of the server to which they are connecting. If the SSL serves login page, the user can be certain they are talking to the proper end system. A phishing attack would typically redirect a user to a site that does not have a valid trusted server certificate issued from an authorized supplier.::"}
{"id": "CWE-524", "name": "Use of Cache Containing Sensitive Information", "description": "The code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:If the cache is accessible to unauthorized actors, attackers can read the cache and obtain this sensitive information.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Protect information stored in cache.::PHASE:Architecture and Design:DESCRIPTION:Do not store unnecessarily sensitive information in the cache.::PHASE:Architecture and Design:DESCRIPTION:Consider using encryption in the cache.::"}
{"id": "CWE-538", "name": "Insertion of Sensitive Information into Externally-Accessible File or Directory", "description": "The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Files or Directories::", "mitigations": "::PHASE:Architecture and Design Operation System Configuration:DESCRIPTION:Do not expose file and directory information to the user.::"}
{"id": "CWE-544", "name": "Missing Standardized Error Handling Mechanism", "description": "The product does not use a standardized method for handling errors throughout the code.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Unexpected State:IMPACT:Varies by Context:NOTE:If the product handles error messages individually, on a one-by-one basis, this is likely to result in inconsistent error handling. The causes of errors may be lost. Also, detailed information about the causes of an error may be unintentionally returned to the user. There may be resultant weaknesses.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:define a strategy for handling errors of different severities, such as fatal errors versus basic log events. Use or create built-in language features, or an external package, that provides an easy-to-use API and define coding standards for the detection and handling of errors.::"}
{"id": "CWE-547", "name": "Use of Hard-coded, Security-relevant Constants", "description": "The product uses hard-coded constants instead of symbolic names for security-critical values, which increases the likelihood of mistakes during code maintenance or security policy change.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:IMPACT:Quality Degradation:IMPACT:Reduce Maintainability:NOTE:The existence of hardcoded constants could cause unexpected behavior and the introduction of weaknesses during code maintenance or when making changes to the code if all occurrences are not modified. The use of hardcoded constants is an indication of poor quality. In addition, these hard-coded values may become available to attackers if the code is ever disclosed.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Avoid using hard-coded constants. Configuration files offer a more flexible solution.::"}
{"id": "CWE-549", "name": "Missing Password Field Masking", "description": "The product does not mask passwords during entry, increasing the potential for attackers to observe and capture passwords.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": "::PHASE:Implementation Requirements:DESCRIPTION:Recommendations include requiring all password fields in your web application be masked to prevent other users from seeing this information.::"}
{"id": "CWE-551", "name": "Incorrect Behavior Order: Authorization Before Parsing and Canonicalization", "description": "If a web server does not fully parse requested URLs before it examines them for authorization, it may be possible for an attacker to bypass authorization protection.", "extended": "For instance, the character strings /./ and / both mean current directory. If /SomeDirectory is a protected directory and an attacker requests /./SomeDirectory, the attacker may be able to gain access to the resource if /./ is not converted to / before the authorization check is performed.", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:URL Inputs should be decoded and canonicalized to the application's current internal representation before being validated and processed for authorization. Make sure that your application does not decode the same input twice. Such errors could be used to bypass allowlist schemes by introducing dangerous inputs after they have been checked.::"}
{"id": "CWE-552", "name": "Files or Directories Accessible to External Parties", "description": "The product makes files or directories accessible to unauthorized actors, even though they should not be.", "extended": "Web servers, FTP servers, and similar servers may store a set of files underneath a root directory that is accessible to the server's users. Applications may store sensitive files underneath this root without also using access control to limit which users may request those files, if any. Alternately, an application might package multiple files or directories into an archive file (e.g., ZIP or tar), but the application might not exclude sensitive files that are underneath those directories.", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories::", "mitigations": "::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 disable public access.::"}
{"id": "CWE-561", "name": "Dead Code", "description": "The product contains dead code, which can never be executed.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:NOTE:Dead code that results from code that can never be executed is an indication of problems with the source code that needs to be fixed and is an indication of poor quality.::SCOPE:Other:IMPACT:Reduce Maintainability::SCOPE:Other:IMPACT:Varies by Context:IMPACT:Execute Unauthorized Code or Commands:NOTE:In some cases, dead code can be reachable or exploitable by attackers after they exploit another weakness or vulnerability that can access the code. For example, some buffer overflow exploits could modify addresses to point to locations that contain dead code.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Remove dead code before deploying the application.::"}
{"id": "CWE-562", "name": "Return of Stack Variable Address", "description": "A function returns the address of a stack variable.", "extended": "Because local variables are allocated on the stack, when a program returns a pointer to a local variable, it is returning a stack address. A subsequent function call is likely to re-use this same stack address, thereby overwriting the value of the pointer, which no longer corresponds to the same variable since a function's stack frame is invalidated when it returns. At best this will cause the value of the pointer to change unexpectedly. In many cases it causes the program to crash the next time the pointer is dereferenced.", "consequences": "::SCOPE:Availability:SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Memory:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If the returned stack buffer address is dereferenced after the return, then an attacker may be able to modify or read memory, depending on how the address is used. If the address is used for reading, then the address itself may be exposed, or the contents that the address points to. If the address is used for writing, this can lead to a crash and possibly code execution.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Fix the code so that it does not return a stack address.::"}
{"id": "CWE-563", "name": "Assignment to Variable without Use", "description": "The variable's value is assigned but never used, i.e., is a dead store. That is, after the assignment, the variable is either assigned another value or goes out of scope.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context:NOTE:This weakness could be an indication of a bug in the program or a deprecated variable that was not removed and is an indication of poor quality. This could lead to further bugs and the introduction of weaknesses.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Remove unused variables from the code.::"}
{"id": "CWE-565", "name": "Reliance on Cookies without Validation and Integrity Checking", "description": "The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:NOTE:Attackers can easily modify cookies, within the browser or by implementing the client-side code outside of the browser. Reliance on cookies without detailed validation and integrity checking can allow attackers to bypass authentication, conduct injection attacks such as SQL injection and cross-site scripting, or otherwise modify inputs in unexpected ways.::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:It is dangerous to use cookies to set a user's privileges. The cookie can be manipulated to escalate an attacker's privileges to an administrative level.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Avoid using cookie data for a security-related decision.::PHASE:Implementation:DESCRIPTION:Perform thorough input validation (i.e.: server side validation) on the cookie data if you're going to use it for a security related decision.::PHASE:Architecture and Design:DESCRIPTION:Add integrity checks to detect tampering.::PHASE:Architecture and Design:DESCRIPTION:Protect critical cookies from replay attacks, since cross-site scripting or other attacks may allow attackers to steal a strongly-encrypted cookie that also passes integrity checks. This mitigation applies to cookies that should only be valid during a single transaction or session. By enforcing timeouts, you may limit the scope of an attack. As part of your integrity check, use an unpredictable, server-side value that is not exposed to the client.::"}
{"id": "CWE-570", "name": "Expression is Always False", "description": "The product contains an expression that will always evaluate to false.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": "::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:Consider refactoring the code, or determine if the code is not including a condition that could cause the expression to become false.::"}
{"id": "CWE-571", "name": "Expression is Always True", "description": "The product contains an expression that will always evaluate to true.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Quality Degradation:IMPACT:Varies by Context::", "mitigations": "::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:Consider refactoring the code, or determine if the code is not including a condition that could cause the expression to become false.::"}
{"id": "CWE-580", "name": "clone() Method Without super.clone()", "description": "The product contains a clone() method that does not call super.clone() to obtain the new object.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Unexpected State:IMPACT:Quality Degradation:NOTE:If a class does not follow this convention, a subclass's clone() method will return an object of the wrong type.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:All implementations of clone() should obtain the new object by calling super.clone().::PHASE:Implementation:DESCRIPTION:In some cases, you can eliminate the clone method altogether and use copy constructors.::"}
{"id": "CWE-581", "name": "Object Model Violation: Just One of Equals and Hashcode Defined", "description": "The product does not maintain equal hashcodes for equal objects.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Other:NOTE:If this invariant is not upheld, it is likely to cause trouble if objects of this class are stored in a collection. If the objects of the class in question are used as a key in a Hashtable or if they are inserted into a Map or Set, it is critical that equal objects have equal hashcodes.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Both Equals() and Hashcode() should be defined.::"}
{"id": "CWE-584", "name": "Return Inside Finally Block", "description": "The code has a return statement inside a finally block.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Unexpected State:IMPACT:Varies by Context:NOTE:With some languages, this will cause any thrown exception in the try block to be discarded.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Do not use a return statement inside the finally block. The finally block should have cleanup code.::"}
{"id": "CWE-586", "name": "Explicit Call to Finalize()", "description": "The product makes an explicit call to the finalize() method from outside the finalizer.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Unexpected State:IMPACT:Quality Degradation:NOTE:While the Java Language Specification allows an object's finalize() method to be called from outside the finalizer, doing so is usually a bad idea. For example, calling finalize() explicitly means that finalize() will be called more than once: the first time will be the explicit call and the last time will be the call that is made after the object is garbage collected.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Do not make explicit calls to finalize().::"}
{"id": "CWE-587", "name": "Assignment of a Fixed Address to a Pointer", "description": "The product sets a pointer to a specific address other than NULL or 0.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:If one executes code at a known location, an attacker might be able to inject code there beforehand.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Reduce Maintainability:IMPACT:Reduce Reliability:NOTE:If the code is ported to another platform or environment, the pointer is likely to be invalid and cause a crash.::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Memory:IMPACT:Modify Memory:NOTE:The data at a known pointer location can be easily read or influenced by an attacker.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Never set a pointer to a fixed address.::"}
{"id": "CWE-601", "name": "URL Redirection to Untrusted Site", "description": "The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:The user may be redirected to an untrusted page that contains malware which may then compromise the user's system. In some cases, an open redirect can also enable the immediate download of a file without the user's permission, because the redirection to an external site may lead to endpoints on those sites that automatically trigger a download action (drive-by download [REF-1478]). This will expose the user to extensive risk. The user's interaction with the web server may also be compromised if the malware conducts keylogging or other attacks that steal credentials, personally identifiable information (PII), or other important data.::SCOPE:Access Control:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:IMPACT:Other:NOTE:By modifying the URL value to a malicious site, an attacker may successfully launch a phishing scam. Th", "mitigations": "::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. Use a list of approved URLs or domains to be used for redirection.::PHASE:Architecture and Design:DESCRIPTION:Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on th"}
{"id": "CWE-603", "name": "Use of Client-Side Authentication", "description": "A client/server product performs authentication within client code but not in server code, allowing server-side authentication to be bypassed via a modified client that omits the authentication check.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:Client-side authentication is extremely weak and may be breached easily. An attacker may read the source code or otherwise reverse-engineer the authentication mechanism, then modify the client or otherwise to access parts of the application that would otherwise be protected.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Do not rely on client side data. Always perform server side authentication.::"}
{"id": "CWE-605", "name": "Multiple Binds to the Same Port", "description": "When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:NOTE:An attacker could access the TCP connection or UDP packets for a different service. Packets from a variety of network services may be stolen or the services spoofed.::", "mitigations": "::PHASE:Policy:DESCRIPTION:Restrict server socket address to known local addresses.::"}
{"id": "CWE-606", "name": "Unchecked Input for Loop Condition", "description": "The product does not properly check inputs that are used for loop conditions, potentially leading to a denial of service or other consequences because of excessive looping.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU)::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Do not use user-controlled data for loop conditions.::PHASE:Implementation:DESCRIPTION:Perform input validation.::"}
{"id": "CWE-609", "name": "Double-Checked Locking", "description": "The product uses double-checked locking to access a resource without the overhead of explicit synchronization, but the locking is insufficient.", "extended": "Double-checked locking refers to the situation where a programmer checks to see if a resource has been initialized, grabs a lock, checks again to see if the resource has been initialized, and then performs the initialization if it has not occurred yet. This should not be done, as it is not guaranteed to work in all languages and on all architectures. In summary, other threads may not be operating inside the synchronous block and are not guaranteed to see the operations execute in the same order as they would appear inside the synchronous block.", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Alter Execution Logic::", "mitigations": "::PHASE:Implementation:DESCRIPTION:While double-checked locking can be achieved in some languages, it is inherently flawed in Java before 1.5, and cannot be achieved without compromising platform independence. Before Java 1.5, only use of the synchronized keyword is known to work. Beginning in Java 1.5, use of the volatile keyword allows double-checked locking to work successfully, although there is some debate as to whether it achieves sufficient performance gains. See references.::"}
{"id": "CWE-611", "name": "Improper Restriction of XML External Entity Reference", "description": "The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Read Files or Directories:NOTE:If the attacker is able to include a crafted DTD and a default entity resolver is enabled, the attacker may be able to access arbitrary files on the system. By submitting an XML file that defines an external entity with a file:// URI, an attacker can cause the processing application to read the contents of a local file. For example, a URI such as file:///c:/winnt/win.ini designates (in Windows) the file C:Winntwin.ini, or file:///etc/passwd designates the password file in Unix-based systems. Once the content of the URI is read, it is fed back into the application that is processing the XML. This application may echo back the data (e.g., in an error message), thereby exposing the file contents.::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:NOTE:An attacker may supply a crafted DTD using URIs with schemes such as http://, forcing the application to make outgoing HTTP requests to servers that ", "mitigations": "::PHASE:Implementation System Configuration:DESCRIPTION:Many XML parsers and validators can be configured to disable external entity expansion.::"}
{"id": "CWE-613", "name": "DEPRECATED: Insufficient Session Expiration", "description": "This entry has been deprecated because it was insufficiently clear. Consider CWE-1462 and its descendants.", "extended": "", "consequences": "", "mitigations": ""}
{"id": "CWE-617", "name": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, an attacker can still cause a denial of service if they can trigger an assert statement, and if the scope of the assert() extends beyond the attacker's own session. For example, if a server handles multiple simultaneous connections, if an assert() occurs in one single connection that causes all other connections to be dropped, this could be a significant denial of service.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.::PHASE:Implementation:DESCRIPTION:Consider changing the assertion to some other less fatal error. This might not be easy to implement, since other code may be needed to handle the error.::PHASE:Implementation:DESCRIPTION:Make sensitive open/close operations non-reachable from directly user-controlled data (e.g. open/close resources)::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Perform input validation on user data.::"}
{"id": "CWE-618", "name": "Exposed Unsafe ActiveX Method", "description": "An ActiveX control is intended for use in a web browser, but it exposes dangerous methods that perform actions that are outside of the browser's security model (e.g. the zone or domain).", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:If there is no integrity checking or origin validation, this method could be invoked by attackers. Since ActiveX controls can exercise far greater control over the operating system than typical Java or javascript, exposed methods can be subject to various vulnerabilities. Consequences depend on the implemented behaviors of those methods, and whether input validation is performed on the provided arguments.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:If you must expose a method, make sure to perform input validation on all arguments, and protect against all possible vulnerabilities.::PHASE:Architecture and Design:DESCRIPTION:Use code signing, although this does not protect against any weaknesses that are already in the control.::PHASE:Architecture and Design System Configuration:DESCRIPTION:Where possible, avoid marking the control as safe for scripting.::"}
{"id": "CWE-619", "name": "Dangling Database Cursor", "description": "The product does not close a database cursor properly, leaving the cursor dangling.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:The cursor could become accessible to other users while retaining the same privileges that were originally assigned. The impact of the issue depends on the cursor's role, but SQL injection attacks are commonly possible.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur.::"}
{"id": "CWE-620", "name": "Unverified Password Change", "description": "When setting a new password for a user, the product does not require knowledge of the original password, or using another form of authentication.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:This could be used by an attacker to change passwords for another user, thus gaining the privileges associated with that user.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:When prompting for a password change, force the user to provide the original password in addition to the new password.::PHASE:Architecture and Design:DESCRIPTION:Do not use forgotten password functionality. But if you must, ensure that you are only providing information to the actual user, e.g. by using an email address or challenge question that the legitimate user already provided in the past; do not allow the current user to change this identity information until the correct password has been provided.::"}
{"id": "CWE-624", "name": "Executable Regular Expression Error", "description": "The product uses a regular expression that either (1) contains an executable component with user-controlled inputs, or (2) allows a user to enable execution by inserting pattern modifiers.", "extended": "Case (2) is possible in the PHP preg_replace() function, and possibly in other languages when a user-controlled input is inserted into a string that is later parsed as a regular expression.", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands::", "mitigations": "::PHASE:Implementation:DESCRIPTION:The regular expression feature in some languages allows inputs to be quoted or escaped before insertion, such as Q and E in Perl.::"}
{"id": "CWE-625", "name": "Permissive Regular Expression", "description": "The product uses a regular expression that does not sufficiently restrict the set of allowed values.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:The regexp could accept substrings that match the pattern, which produces a partial comparison to the target. In some cases, this can allow dangerous substrings to bypass the intended protection.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:When applicable, ensure that the regular expression marks beginning and ending string patterns, such as /^string$/ for Perl.::"}
{"id": "CWE-628", "name": "Function Call with Incorrectly Specified Arguments", "description": "The product calls a function, procedure, or routine with arguments that are not correctly specified.", "extended": "", "consequences": "::SCOPE:Other:SCOPE:Access Control:IMPACT:Quality Degradation:IMPACT:Gain Privileges or Assume Identity:IMPACT:Unexpected State:IMPACT:Varies by Context:NOTE:This weakness can cause unintended, always-incorrect behavior. It can lead to additional weaknesses such as allowing an attacker to gain unintended access to system resources.::", "mitigations": "::PHASE:Build and Compilation:DESCRIPTION:Once found, these issues are easy to fix. Use code inspection tools and relevant compiler features to identify potential violations. Pay special attention to code that is not likely to be exercised heavily during QA.::PHASE:Architecture and Design:DESCRIPTION:Make sure your API's are stable before you use them in production code.::"}
{"id": "CWE-639", "name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "extended": "It is likely that an attacker would have to be an authenticated user in the system. However, the authorization process would not properly check the data access operation to ensure that the authenticated user performing the operation has sufficient entitlements to perform the requested data access, hence bypassing any other authorization checks present in the system. For example, attackers can look at places where user specific data is retrieved (e.g. search screens) and determine whether the key for the item being looked up is controllable externally. The key may be a hidden field in the HTML form field, might be passed as a URL parameter or as an unencrypted cookie variable, then in each of these cases it will be possible to tamper with the key value.", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:Access control checks for specific user data or functionality can be bypassed.::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Horizontal escalation of privilege is possible (one user can view/modify information of another user).::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:Vertical escalation of privilege is possible if the user-controlled key is actually a flag that indicates administrator status, allowing the attacker to gain administrative access.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:For each and every data access, ensure that the user has sufficient privilege to access the record that is being requested.::PHASE:Architecture and Design Implementation:DESCRIPTION:Make sure that the key that is used in the lookup of a specific user's record is not controllable externally by the user or that any tampering can be detected.::PHASE:Architecture and Design:DESCRIPTION:Use encryption in order to make it more difficult to guess other legitimate values of the key or associate a digital signature with the key so that the server can verify that there has been no tampering.::"}
{"id": "CWE-640", "name": "Weak Password Recovery Mechanism for Forgotten Password", "description": "The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:Weak password recovery schemes completely undermine a strong password authentication scheme. An attacker could gain unauthorized access to the system by retrieving a legitimate user's authentication credentials.::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):NOTE:An attacker could deny service to legitimate system users by launching a brute force attack on the password recovery mechanism using user ids of legitimate users.::SCOPE:Integrity:SCOPE:Other:IMPACT:Other:NOTE:The system's security functionality is turned against the system by the attacker.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Make sure that all input supplied by the user to the password recovery mechanism is thoroughly filtered and validated.::PHASE:Architecture and Design:DESCRIPTION:Do not use standard weak security questions and use several security questions.::PHASE:Architecture and Design:DESCRIPTION:Make sure that there is throttling on the number of incorrect answers to a security question. Disable the password recovery functionality after a certain (small) number of incorrect guesses.::PHASE:Architecture and Design:DESCRIPTION:Require that the user properly answers the security question prior to resetting their password and sending the new password to the e-mail address of record.::PHASE:Architecture and Design:DESCRIPTION:Never allow the user to control what e-mail address the new password will be sent to in the password recovery mechanism.::PHASE:Architecture and Design:DESCRIPTION:Assign a new temporary password rather than revealing the original password.::"}
{"id": "CWE-641", "name": "Improper Restriction of Names for Files and Other Resources", "description": "The product constructs the name of a file or other resource using input from an upstream component, but it does not restrict or incorrectly restricts the resulting name.", "extended": "This may produce resultant weaknesses. For instance, if the names of these resources contain scripting characters, it is possible that a script may get executed in the client's browser if the application ever displays the name of the resource on a dynamically generated web page. Alternately, if the resources are consumed by some application parser, a specially crafted name can exploit some vulnerability internal to the parser, potentially resulting in execution of arbitrary code on the server machine. The problems will vary based on the context of usage of such malformed resource names and whether vulnerabilities are present in or assumptions are made by the targeted technology that would make code execution possible.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:Execution of arbitrary code in the context of usage of the resources with dangerous names.::SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Read Application Data:IMPACT:DoS: Crash, Exit, or Restart:NOTE:Crash of the consumer code of these resources resulting in information leakage or denial of service.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Do not allow users to control names of resources used on the server side.::PHASE:Architecture and Design:DESCRIPTION:Perform allowlist input validation at entry points and also before consuming the resources. Reject bad file names rather than trying to cleanse them.::PHASE:Architecture and Design:DESCRIPTION:Make sure that technologies consuming the resources are not vulnerable (e.g. buffer overflow, format string, etc.) in a way that would allow code execution if the name of the resource is malformed.::"}
{"id": "CWE-645", "name": "Overly Restrictive Account Lockout Mechanism", "description": "The product contains an account lockout protection mechanism, but the mechanism is too restrictive and can be triggered too easily, which allows attackers to deny service to legitimate users by causing their accounts to be locked out.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):NOTE:An attacker could lock users out of their accounts by causing the account lockout mechanism to trigger, e.g. by attempting many logins. This could deny service to legitimate system users.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Implement more intelligent password throttling mechanisms such as those that take IP address into account, in addition to the login name.::PHASE:Architecture and Design:DESCRIPTION:Implement a lockout timeout that grows as the number of incorrect login attempts goes up, eventually resulting in a complete lockout.::PHASE:Architecture and Design:DESCRIPTION:Consider alternatives to account lockout that would still be effective against password brute force attacks, such as presenting the user machine with a puzzle to solve (making it do some computation).::"}
{"id": "CWE-648", "name": "Incorrect Use of Privileged APIs", "description": "The product does not conform to the API requirements for a function call that requires extra privileges. This could allow attackers to gain privileges by causing the function to be called incorrectly.", "extended": "When a product contains certain functions that perform operations requiring an elevated level of privilege, the caller of a privileged API must be careful to: ensure that assumptions made by the APIs are valid, such as validity of arguments account for known weaknesses in the design/implementation of the API call the API from a safe context If the caller of the API does not follow these requirements, then it may allow a malicious user or process to elevate their privilege, hijack the process, or steal sensitive data. For instance, it is important to know if privileged APIs do not shed their privileges before returning to the caller or if the privileged function might make certain assumptions about the data, context or state information passed to it by the caller. It is important to always know when and how privileged APIs can be called in order to ensure that their elevated level of privilege cannot be exploited.", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker may be able to elevate privileges.::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:An attacker may be able to obtain sensitive information.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker may be able to execute code.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Before calling privileged APIs, always ensure that the assumptions made by the privileged code hold true prior to making the call.::PHASE:Architecture and Design:DESCRIPTION:Know architecture and implementation weaknesses of the privileged APIs and make sure to account for these weaknesses before calling the privileged APIs to ensure that they can be called safely.::PHASE:Implementation:DESCRIPTION:If privileged APIs make certain assumptions about data, context or state validity that are passed by the caller, the calling code must ensure that these assumptions have been validated prior to making the call.::PHASE:Implementation:DESCRIPTION:If privileged APIs do not shed their privilege prior to returning to the calling code, then calling code needs to shed these privileges immediately and safely right after the call to the privileged APIs. In particular, the calling code needs to ensure that a privileged thread of execution will never be returned to the user or made available to user-controlled processes.::PHASE:Implementation:DESCRIPTION:Only call privileged APIs from safe, consistent and expected state.::PHASE:Implementation:DESCRIPTION:Ensure that a failure or an error will not leave a system in a state where privileges are not properly shed and privilege escalation is possible (i.e. fail securely with regards to handling of privileges).::"}
{"id": "CWE-649", "name": "Reliance on Obfuscation or Encryption of Security-Relevant Inputs without Integrity Checking", "description": "The product uses obfuscation or encryption of inputs that should not be mutable by an external actor, but the product does not use integrity checks to detect if those inputs have been modified.", "extended": "When an application relies on obfuscation or incorrectly applied / weak encryption to protect client-controllable tokens or parameters, that may have an effect on the user state, system state, or some decision made on the server. Without protecting the tokens/parameters for integrity, the application is vulnerable to an attack where an adversary traverses the space of possible values of the said token/parameter in order to attempt to gain an advantage. The goal of the attacker is to find another admissible value that will somehow elevate their privileges in the system, disclose information or change the behavior of the system in some way beneficial to the attacker. If the application does not protect these critical tokens/parameters for integrity, it will not be able to determine that these values have been tampered with. Measures that are used to protect data for confidentiality should not be relied upon to provide the integrity service.", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State:NOTE:The inputs could be modified without detection, causing the product to have unexpected system state or make incorrect security decisions.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Protect important client controllable tokens/parameters for integrity using PKI methods (i.e. digital signatures) or other means, and checks for integrity on the server side.::PHASE:Architecture and Design:DESCRIPTION:Repeated requests from a particular user that include invalid values of tokens/parameters (those that should not be changed manually by users) should result in the user account lockout.::PHASE:Architecture and Design:DESCRIPTION:Client side tokens/parameters should not be such that it would be easy/predictable to guess another valid state.::PHASE:Architecture and Design:DESCRIPTION:Obfuscation should not be relied upon. If encryption is used, it needs to be properly applied (i.e. proven algorithm and implementation, use padding, use random initialization vector, user proper encryption mode). Even with proper encryption where the ciphertext does not leak information about the plaintext or reveal its structure, compromising integrity is possible (although less likely) without the provision of the integrity service.::"}
{"id": "CWE-653", "name": "Improper Isolation or Compartmentalization", "description": "The product does not properly compartmentalize or isolate functionality, processes, or resources that require different privilege levels, rights, or permissions.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:NOTE:The exploitation of a weakness in low-privileged areas of the software can be leveraged to reach higher-privileged areas without having to overcome any additional obstacles, extending the scope of the damage to higher-privileged users..::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Break up privileges between different modules, objects, or entities. Minimize the interfaces between modules and require strong access control between them.::"}
{"id": "CWE-654", "name": "Reliance on a Single Factor in a Security Decision", "description": "A protection mechanism relies exclusively, or to a large extent, on the evaluation of a single condition or the integrity of a single object or entity in order to make a decision about granting access to restricted resources or functionality.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:If the single factor is compromised (e.g. by theft or spoofing), then the integrity of the entire security mechanism can be violated with respect to the user that is identified by that factor.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:It can become difficult or impossible for the product to be able to distinguish between legitimate activities by the entity who provided the factor, versus illegitimate activities by an attacker.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use multiple simultaneous checks before granting access to critical operations or granting critical privileges. A weaker but helpful mitigation is to use several successive checks (multiple layers of security).::PHASE:Architecture and Design:DESCRIPTION:Use redundant access rules on different choke points (e.g., firewalls).::"}
{"id": "CWE-656", "name": "Reliance on Security Through Obscurity", "description": "The product uses a protection mechanism whose strength depends heavily on its obscurity, such that knowledge of its algorithms or key data is sufficient to defeat the mechanism.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Varies by Context:NOTE:The reliance on security through obscurity can produce resultant weaknesses if an attacker is able to reverse engineer the inner workings of the mechanism.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Always consider whether knowledge of your code or design is sufficient to break it. Reverse engineering is a highly successful discipline, and financially feasible for motivated adversaries. Black-box techniques are established for binary analysis of executables that use obfuscation, runtime analysis of proprietary protocols, inferring file formats, and others.::PHASE:Architecture and Design:DESCRIPTION:When available, use publicly-vetted algorithms and procedures, as these are more likely to undergo more extensive security analysis and testing. This is especially the case with encryption and authentication.::PHASE:Architecture and Design:DESCRIPTION:Obscurity can be one small part of defense in depth, since it can create more work for an attacker; however, it is a significant risk if used as the primary means of protection.::"}
{"id": "CWE-663", "name": "Use of a Non-reentrant Function in a Concurrent Context", "description": "The product calls a non-reentrant function in a concurrent context in which a competing code sequence (e.g. thread or signal handler) may have an opportunity to call the same function or otherwise influence its state.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Modify Memory:IMPACT:Read Memory:IMPACT:Modify Application Data:IMPACT:Read Application Data:IMPACT:Alter Execution Logic::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use reentrant functions if available.::PHASE:Implementation:DESCRIPTION:Add synchronization to your non-reentrant function.::PHASE:Implementation:DESCRIPTION:In Java, use the ReentrantLock Class.::"}
{"id": "CWE-676", "name": "Use of Potentially Dangerous Function", "description": "The product invokes a potentially dangerous function that could introduce a vulnerability if it is used incorrectly, but the function can also be used safely.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:IMPACT:Quality Degradation:IMPACT:Unexpected State:NOTE:If the function is used incorrectly, then it could result in security problems.::", "mitigations": "::PHASE:Build and Compilation Implementation:DESCRIPTION:Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the banned.h include file from Microsoft's SDL. [REF-554] [REF-1009] [REF-7]::"}
{"id": "CWE-681", "name": "Incorrect Conversion between Numeric Types", "description": "When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.", "extended": "", "consequences": "::SCOPE:Other:SCOPE:Integrity:IMPACT:Unexpected State:IMPACT:Quality Degradation:NOTE:The program could wind up using the wrong number and generate incorrect results. If the number is used to allocate resources or make a security decision, then this could introduce a vulnerability.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Avoid making conversion between numeric types. Always check for the allowed ranges.::"}
{"id": "CWE-694", "name": "Use of Multiple Resources with Duplicate Identifier", "description": "The product uses multiple resources that can have the same identifier, in a context in which unique identifiers are required.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:If the product assumes that each resource has a unique identifier, the product could operate on the wrong resource if attackers can cause multiple resources to be associated with the same identifier.::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If unique identifiers are assumed when protecting sensitive resources, then duplicate identifiers might allow attackers to bypass the protection.::SCOPE:Other:IMPACT:Quality Degradation::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Where possible, use unique identifiers. If non-unique identifiers are detected, then do not operate any resource with a non-unique identifier and report the error appropriately.::"}
{"id": "CWE-695", "name": "Use of Low-Level Functionality", "description": "The product uses low-level functionality that is explicitly prohibited by the framework or specification under which the product is supposed to operate.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Varies by Context:IMPACT:Unexpected State:NOTE:The use of low-level functionality can violate the specification in unexpected ways that effectively disable built-in protection mechanisms, introduce exploitable inconsistencies, or otherwise expose the functionality to attack.::", "mitigations": ""}
{"id": "CWE-698", "name": "Execution After Redirect (EAR)", "description": "The web application sends a redirect to another location, but instead of exiting, it executes additional code.", "extended": "", "consequences": "::SCOPE:Other:SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Alter Execution Logic:IMPACT:Execute Unauthorized Code or Commands:NOTE:This weakness could affect the control flow of the application and allow execution of untrusted code.::", "mitigations": ""}
{"id": "CWE-708", "name": "Incorrect Ownership Assignment", "description": "The product assigns an owner to a resource, but the owner is outside of the intended control sphere.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:This may allow the resource to be manipulated by actors outside of the intended control sphere. An attacker could read and modify data for which they do not have permissions to access directly.::", "mitigations": "::PHASE:Policy:DESCRIPTION:Periodically review the privileges and their owners.::"}
{"id": "CWE-733", "name": "Compiler Optimization Removal or Modification of Security-critical Code", "description": "The developer builds a security-critical protection mechanism into the software, but the compiler optimizes the program such that the mechanism is removed or modified.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Alter Execution Logic::", "mitigations": ""}
{"id": "CWE-749", "name": "Exposed Dangerous Method or Function", "description": "The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.", "extended": "Many different kinds of technologies effectively provide access to methods or functions, such as ActiveX controls, Java functions, IOCTLs, and so on. The exposure can occur in a few different ways: The function/method was never intended to be exposed to outside actors. The function/method was only intended to be accessible to a limited set of actors, such as Internet-based access from a single web site.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Read Application Data:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Other:NOTE:Exposing critical functionality essentially provides an attacker with the privilege level of the exposed functionality. The consequences may vary depending on the behavior of the exposed method. Typically, this could result in the modification or exposure of sensitive data or possibly even execution of arbitrary code.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:If you must expose a method, make sure to perform input validation on all arguments, limit access to authorized parties, and protect against all possible vulnerabilities.::PHASE:Architecture and Design Implementation:STRATEGY:Attack Surface Reduction:DESCRIPTION:Identify all exposed functionality. Explicitly list all functionality that must be exposed to some user or set of users. Identify which functionality may be: accessible to all users restricted to a small set of privileged users prevented from being directly accessible at all Ensure that the implemented code follows these expectations. This includes setting the appropriate access modifiers where applicable (public, private, protected, etc.) or not marking ActiveX controls safe-for-scripting.::"}
{"id": "CWE-756", "name": "Missing Custom Error Page", "description": "The product does not return custom error pages to the user, possibly exposing sensitive information.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:Attackers can leverage the additional information provided by a default error page to mount attacks targeted on the framework, database, or other resources used by the application.::", "mitigations": ""}
{"id": "CWE-763", "name": "Release of Invalid Pointer or Reference", "description": "The product attempts to return a memory resource to the system, but it calls the wrong release function or calls the appropriate release function incorrectly.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Availability:SCOPE:Confidentiality:IMPACT:Modify Memory:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Execute Unauthorized Code or Commands:NOTE:This weakness may result in the corruption of memory, and perhaps instructions, possibly leading to a crash. If the corrupted memory can be effectively controlled, it may be possible to execute arbitrary code.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Only call matching memory management functions. Do not mix and match routines. For example, when you allocate a buffer with malloc(), dispose of the original pointer with free().::PHASE:Implementation:DESCRIPTION:When programming in C++, consider using smart pointers provided by the boost library to help correctly and consistently manage memory.::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, glibc in Linux provides protection against free of invalid pointers.::PHASE:Architecture and Design:DESCRIPTION:Use a language that provides abstractions for memory allocation and deallocation.::"}
{"id": "CWE-764", "name": "Multiple Locks of a Critical Resource", "description": "The product locks a critical resource more times than intended, leading to an unexpected state in the system.", "extended": "", "consequences": "::SCOPE:Availability:SCOPE:Integrity:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Unexpected State:NOTE:When a product is operating in a concurrent environment and repeatedly locks a critical resource, the consequences will vary based on the type of lock, the lock's implementation, and the resource being protected. In some situations such as with semaphores, the resources are pooled and extra locking calls will reduce the size of the total available pool, possibly leading to degraded performance or a denial of service. If this can be triggered by an attacker, it will be similar to an unrestricted lock (CWE-412). In the context of a binary lock, it is likely that any duplicate locking attempts will never succeed, since the lock is already held and progress may not be possible.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:When locking and unlocking a resource, try to be sure that all control paths through the code in which the resource is locked one or more times correspond to exactly as many unlocks. If the software acquires a lock and then determines it is not able to perform its intended behavior, be sure to release the lock(s) before waiting for conditions to improve. Reacquire the lock(s) before trying again.::"}
{"id": "CWE-765", "name": "Multiple Unlocks of a Critical Resource", "description": "The product unlocks a critical resource more times than intended, leading to an unexpected state in the system.", "extended": "", "consequences": "::SCOPE:Availability:SCOPE:Integrity:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Modify Memory:IMPACT:Unexpected State:NOTE:When the product is operating in a concurrent environment and repeatedly unlocks a critical resource, the consequences will vary based on the type of lock, the lock's implementation, and the resource being protected. In some situations such as with semaphores, the resources are pooled and extra calls to unlock will increase the count for the number of available resources, likely resulting in a crash or unpredictable behavior when the system nears capacity.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:When locking and unlocking a resource, try to be sure that all control paths through the code in which the resource is locked one or more times correspond to exactly as many unlocks. If the product acquires a lock and then determines it is not able to perform its intended behavior, be sure to release the lock(s) before waiting for conditions to improve. Reacquire the lock(s) before trying again.::"}
{"id": "CWE-766", "name": "Critical Data Element Declared Public", "description": "The product declares a critical variable, field, or member to be public when intended security policy requires it to be private.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:Making a critical variable public allows anyone with access to the object in which the variable is contained to alter or read the value.::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Data should be private, static, and final whenever possible. This will assure that your code is protected by instantiating early, preventing access, and preventing tampering.::"}
{"id": "CWE-767", "name": "Access to Critical Private Variable via Public Method", "description": "The product defines a public method that reads or modifies a private variable.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Varies by Context:NOTE:If an attacker modifies the variable to contain unexpected values, this could violate assumptions from other parts of the code. Additionally, if an attacker can read the private variable, it may expose sensitive information or make it easier to launch further attacks.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use class accessor and mutator methods appropriately. Perform validation when accepting data from a public method that is intended to modify a critical private variable. Also be sure that appropriate access controls are being applied when a public method interfaces with critical data.::"}
{"id": "CWE-770", "name": "Allocation of Resources Without Limits or Throttling", "description": "The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):NOTE:When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.::PHASE:Architecture and Design:DESCRIPTION:Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.::PHASE:Architecture and Design:DESCRIPTION:Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place, and it will help the administrator to identify who is committing the abuse. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.::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 t"}
{"id": "CWE-771", "name": "Missing Reference to Active Allocated Resource", "description": "The product does not properly maintain a reference to a resource that has been allocated, which prevents the resource from being reclaimed.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):NOTE:If an attacker can create the conditions that mistakenly release a reference to a resource, then the attacker could prevent the resource from being reclaimed, deplete the available resource pool, and prevent other processes or threads from accessing the same type of resource.::", "mitigations": "::PHASE:Operation Architecture and Design:STRATEGY:Resource Limitation:DESCRIPTION:Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems. When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users. Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).::"}
{"id": "CWE-772", "name": "Missing Release of Resource after Effective Lifetime", "description": "The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (CPU):NOTE:An attacker that can influence the allocation of resources that are not properly released could deplete the available resource pool and prevent all other processes from accessing the same type of resource. Frequently-affected resources include memory, CPU, disk space, power or battery, etc.::", "mitigations": "::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, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated.::PHASE:Implementation:DESCRIPTION:It is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free resources in a function. If you allocate resources that you intend to free upon completion of the function, you must be sure to free the resources at all exit points for that function including error conditions.::PHASE:Operation Architecture and Design:STRATEGY:Resource Limitation:DESCRIPTION:Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems. When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users. Ensure "}
{"id": "CWE-776", "name": "Improper Restriction of Recursive Entity References in DTDs", "description": "The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):NOTE:If the DTD contains a large number of nested or recursive entities, this allows the attacker to expand data exponentially when the DTD is parsed, quickly consuming all system resources.::", "mitigations": "::PHASE:Operation:DESCRIPTION:If possible, prohibit the use of DTDs or use an XML parser that limits the expansion of recursive DTD entities.::PHASE:Implementation:DESCRIPTION:Before parsing XML files with associated DTDs, scan for recursive entity declarations and do not continue parsing potentially explosive content.::"}
{"id": "CWE-778", "name": "Insufficient Logging", "description": "When a security-critical event occurs, the product either does not record the event or omits important details about the event when logging it.", "extended": "", "consequences": "::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:Malicious behavior can become more difficult to detect, such as a failed login attempt. This may hinder forensic analysis after an attack succeeds. There will be no trail for forensic analysis, and discovering the cause of problems or the source of attacks may become more difficult or impossible.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use a centralized logging mechanism that supports multiple levels of detail.::PHASE:Implementation:DESCRIPTION:Ensure that all security-related successes and failures can be logged. When storing data in the cloud (e.g., AWS S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to enable and capture detailed logging information.::PHASE:Operation:DESCRIPTION:Be sure to set the level of logging appropriately in a production environment. Sufficient data should be logged to enable system administrators to detect attacks, diagnose errors, and recover from attacks. At the same time, logging too much data (CWE-779) can cause the same problems, including unexpected costs when using a cloud environment.::PHASE:Operation:DESCRIPTION:To enable storage logging using Azure's Portal, navigate to the name of the Storage Account, locate Monitoring (CLASSIC) section, and select Diagnostic settings (classic). For each of the various properties (blob, file, table, queue), ensure the status is properly set for the desired logging data. If using PowerShell, the Set-AzStorageServiceLoggingProperty command could be called using appropriate -ServiceType, -LoggingOperations, and -RetentionDays arguments.::"}
{"id": "CWE-779", "name": "Logging of Excessive Data", "description": "The product logs too much information, making log files hard to process and possibly hindering recovery efforts or forensic analysis after an attack.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Other):NOTE:Log files can become so large that they consume excessive resources, such as disk and CPU, which can hinder the performance of the system.::SCOPE:Non-Repudiation:IMPACT:Hide Activities:NOTE:Logging too much information can make the log files of less use to forensics analysts and developers when trying to detect anomalous conditions, diagnose a problem, or recover from an attack. This can provide cover for an attacker while attempting to penetrate a system. If system administrators are unable to effectively process log files, attempted attacks may go undetected, possibly leading to eventual system compromise.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Suppress large numbers of duplicate log messages and replace them with periodic summaries. For example, syslog may include an entry that states last message repeated X times when recording repeated events.::PHASE:Architecture and Design:DESCRIPTION:Support a maximum size for the log file that can be controlled by the administrator. If the maximum size is reached, the admin should be notified. Also, consider reducing functionality of the product. This may result in a denial-of-service to legitimate product users, but it will prevent the product from adversely impacting the entire system.::PHASE:Implementation:DESCRIPTION:Adjust configurations appropriately when the product is transitioned from a debug state to production.::"}
{"id": "CWE-783", "name": "Operator Precedence Logic Error", "description": "The product uses an expression in which operator precedence causes incorrect logic to be used.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Varies by Context:IMPACT:Unexpected State:NOTE:While often just a bug, operator precedence logic errors can have serious consequences if they are used in security-critical code, such as making an authentication decision. The consequences will vary based on the context surrounding the incorrect precedence. In a security decision, violations of integrity or confidentiality are the most likely results. Otherwise, a crash may occur due to the software reaching an unexpected state.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Regularly wrap sub-expressions in parentheses, especially in security-critical code.::"}
{"id": "CWE-786", "name": "Access of Memory Location Before Start of Buffer", "description": "The product reads or writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:For an out-of-bounds read, the attacker may have access to sensitive information. If the sensitive information contains system details, such as the current buffer's position in memory, this knowledge can be used to craft further attacks, possibly with more severe consequences.::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:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands: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.::", "mitigations": ""}
{"id": "CWE-787", "name": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.::SCOPE:Other:IMPACT:Unexpected State:NOTE:Subsequent write operations can produce undefined or unexpected results.::", "mitigations": "::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 c"}
{"id": "CWE-788", "name": "Access of Memory Location After End of Buffer", "description": "The product reads or writes to a buffer using an index or pointer that references a memory location after the end of the buffer.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:For an out-of-bounds read, the attacker may have access to sensitive information. If the sensitive information contains system details, such as the current buffer's position in memory, this knowledge can be used to craft further attacks, possibly with more severe consequences.::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. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.::SCOPE:Integrity:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:If the memory accessible by the attacker can be effectively controlled, it may be possible to execute arbitrary code, as with a standard buffer overflow. If the attacker can overwrite a pointer's worth of memory (usually 32 or 64 ", "mitigations": ""}
{"id": "CWE-791", "name": "Incomplete Filtering of Special Elements", "description": "The product receives data from an upstream component, but it does not completely filter special elements before sending it to a downstream component.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State::", "mitigations": ""}
{"id": "CWE-798", "name": "Use of Hard-coded Credentials", "description": "The product contains hard-coded credentials, such as a password or cryptographic key.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If hard-coded passwords are used, it is almost certain that malicious users will gain access to the account in question. Any user of the product that hard-codes passwords may be able to extract the password. Client-side systems with hard-coded passwords pose even more of a threat, since the extraction of a password from a binary is usually very simple.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:SCOPE:Other:IMPACT:Read Application Data:IMPACT:Gain Privileges or Assume Identity:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Other:NOTE:This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code. If the password is ever discovered or published (a common occurrence on the Internet), then anybody with knowledge of this password can access the product. Finally, since all ins", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:For outbound authentication: store passwords, keys, and other credentials outside of the code in a strongly-protected, encrypted configuration file or database that is protected from access by all outsiders, including other local users on the same system. Properly protect the key (CWE-320). If you cannot use encryption to protect the file, then make sure that the permissions are as restrictive as possible [REF-7]. In Windows environments, the Encrypted File System (EFS) may provide some protection.::PHASE:Architecture and Design:DESCRIPTION:For inbound authentication: Rather than hard-code a default username and password, key, or other authentication credentials for first time logins, utilize a first login mode that requires the user to enter a unique strong password or key.::PHASE:Architecture and Design:DESCRIPTION:If the product must contain hard-coded credentials or they cannot be removed, perform access control checks and limit which entities can access the feature that requires the hard-coded credentials. For example, a feature might only be enabled through the system console instead of through a network connection.::PHASE:Architecture and Design:DESCRIPTION:For inbound authentication using passwords: apply strong one-way hashes to passwords and store those hashes in a configuration file or database with appropriate access control. That way, theft of the file/database still requires the attacker to try to crack the password. W"}
{"id": "CWE-804", "name": "Guessable CAPTCHA", "description": "The product uses a CAPTCHA challenge, but the challenge can be guessed or automatically recognized by a non-human actor.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:When authorization, authentication, or another protection mechanism relies on CAPTCHA entities to ensure that only human actors can access certain functionality, then an automated attacker such as a bot may access the restricted functionality by guessing the CAPTCHA.::", "mitigations": ""}
{"id": "CWE-805", "name": "Buffer Access with Incorrect Length Value", "description": "The product uses a sequential operation to read or write a buffer, but it uses an incorrect length value that causes it to access memory that is outside of the bounds of the buffer.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Read Memory:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:NOTE:When the length value exceeds the size of the destination, an out-of-bounds read or write could occur. 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: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 program into an infinite loop.::", "mitigations": "::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 c"}
{"id": "CWE-807", "name": "Reliance on Untrusted Inputs in a Security Decision", "description": "The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.", "extended": "Without sufficient encryption, integrity checking, or other mechanism, any input that originates from an outsider cannot be trusted.", "consequences": "::SCOPE:Confidentiality:SCOPE:Access Control:SCOPE:Availability:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:NOTE:When security decisions such as authentication and authorization are made based on the values of these inputs, attackers can bypass the security of the product to access whatever is being protected. An attacker could change these inputs using customized clients or other attacks. This change might not be detected. The consequences will depend on the associated functionality, but they can range from granting additional privileges to untrusted users to bypassing important security checks. Ultimately, this weakness may lead to exposure or modification of sensitive data, system crash, or execution of arbitrary code.::", "mitigations": "::PHASE:Architecture and Design:STRATEGY:Attack Surface Reduction:DESCRIPTION:Store state information and sensitive data on the server side only. Ensure that the system definitively and unambiguously keeps track of its own state and user state and has rules defined for legitimate state transitions. Do not allow any application user to affect state directly in any way other than through legitimate actions leading to state transitions. If information must be stored on the client, do not do so without encryption and integrity checking, or otherwise having a mechanism on the server side to catch tampering. Use a message authentication code (MAC) algorithm, such as Hash Message Authentication Code (HMAC) [REF-529]. Apply this against the state or sensitive data that has to be exposed, which can guarantee the integrity of the data - i.e., that the data has not been modified. Ensure that a strong hash function is used (CWE-328).::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. With a stateless protocol such as HTTP, use a framework that maintains the state for you. Examples include ASP.NET View State [REF-756] and the OWASP ESAPI Session Management feature [REF-45]. Be careful of language features that provide state support, since these might be provided as a convenience to the programmer and may not be considering se"}
{"id": "CWE-820", "name": "Missing Synchronization", "description": "The product utilizes a shared resource in a concurrent manner but does not attempt to synchronize access to the resource.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Read Application Data:IMPACT:Alter Execution Logic:NOTE:If access to a shared resource is not synchronized, then the resource may not be in a state that is expected by the product. This might lead to unexpected or insecure behaviors, especially if an attacker can influence the shared resource.::", "mitigations": ""}
{"id": "CWE-821", "name": "Incorrect Synchronization", "description": "The product utilizes a shared resource in a concurrent manner, but it does not correctly synchronize access to the resource.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Other:IMPACT:Modify Application Data:IMPACT:Read Application Data:IMPACT:Alter Execution Logic:IMPACT:Unexpected State:NOTE:If access to a shared resource is not correctly synchronized, then the resource may not be in a state that is expected by the product. This might lead to unexpected or insecure behaviors, especially if an attacker can influence the shared resource.::", "mitigations": ""}
{"id": "CWE-822", "name": "Untrusted Pointer Dereference", "description": "The product obtains a value from an untrusted source, converts this value to a pointer, and dereferences the resulting pointer.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:If the dereferencing operation is for a read, then the attack might allow reading of sensitive data, cause a crash, or set a variable to an unexpected value (since the value will be read from an unexpected memory location).::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If the untrusted pointer references a memory location that is not accessible to the product, or points to a location that is malformed or larger than expected by a read or write operation, the application may terminate unexpectedly.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Modify Memory:NOTE:If the pointer is dereferenced for a write operation, the attack might allow modification of critical state variables, cause a crash, or execute code. If the untrusted pointer is used in a function call, then the attacker might be able to call arbitrary functions.::", "mitigations": ""}
{"id": "CWE-823", "name": "Use of Out-of-range Pointer Offset", "description": "The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer.", "extended": "The offset might be out-of-range if it comes from an untrusted source, is the result of an incorrect calculation, or occurs because of another error. If an attacker can control or influence the offset so that it points outside of the intended boundaries of the structure, then the attacker may be able to read or write to memory locations that are used elsewhere in the product. As a result, the attack might change the state of the product as accessed through program variables, cause a crash or instable behavior, and possibly lead to code execution.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:If the untrusted pointer is used in a read operation, an attacker might be able to read sensitive portions of memory.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If the untrusted pointer references a memory location that is not accessible to the program, or points to a location that is malformed or larger than expected by a read or write operation, the application may terminate unexpectedly.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Modify Memory:NOTE:If the untrusted pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.::", "mitigations": ""}
{"id": "CWE-824", "name": "Access of Uninitialized Pointer", "description": "The product accesses or uses a pointer that has not been initialized.", "extended": "If an attacker can influence the portion of uninitialized memory that is contained in the pointer, this weakness could be leveraged to execute code or perform other attacks. Depending on memory layout, associated memory management behaviors, and product operation, the attacker might be able to influence the contents of the uninitialized pointer, thus gaining more fine-grained control of the memory location to be accessed.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:If the uninitialized pointer is used in a read operation, it might not point to a valid memory location. An attacker might be able to read sensitive portions of memory.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If the uninitialized pointer references a memory location that is not accessible to the product, or points to a location that is malformed (such as NULL) or larger than expected by a read or write operation, then a crash may occur.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:If the uninitialized pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible. If the uninitialized pointer is used as a function call, then arbitrary functions could be invoked.::", "mitigations": ""}
{"id": "CWE-825", "name": "Expired Pointer Dereference", "description": "The product dereferences a pointer that contains a location for memory that was previously valid, but is no longer valid.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:NOTE:If the expired pointer is used in a read operation, an attacker might be able to control data read in by the application.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If the expired pointer references a memory location that is not accessible to the product, or points to a location that is malformed (such as NULL) or larger than expected by a read or write operation, then a crash may occur.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:If the expired pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Choose a language that provides automatic memory management.::PHASE:Implementation:DESCRIPTION:When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.::"}
{"id": "CWE-826", "name": "Premature Release of Resource During Expected Lifetime", "description": "The product releases a resource that is still intended to be used by itself or another actor.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Read Memory:NOTE:If the released resource is subsequently reused or reallocated, then a read operation on the original resource might access sensitive data that is associated with a different user or entity.::SCOPE:Availability:IMPACT:Unexpected State:IMPACT:DoS: Crash, Exit, or Restart:NOTE:When the resource is released, the software might modify some of its structure, or close associated channels (such as a file descriptor). When the software later accesses the resource as if it is valid, the resource might not be in an expected state, leading to resultant errors that may lead to a crash.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Modify Application Data:IMPACT:Modify Memory:NOTE:When the resource is released, the software might modify some of its structure. This might affect logic in the sections of code that still assume the resource is active. If the relea", "mitigations": ""}
{"id": "CWE-829", "name": "Inclusion of Functionality from Untrusted Control Sphere", "description": "The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could insert malicious functionality into the program by causing the program to download code that the attacker has placed into the untrusted control sphere, such as a malicious web site. This could enable the injection of malware, information exposure by granting excessive privileges or permissions to the untrusted functionality, DOM-based XSS vulnerabilities, stealing user's cookies, open redirect to malware (CWE-601), etc.::", "mitigations": "::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 [REF-1482].::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-45] provide this capability.::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 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, "}
{"id": "CWE-832", "name": "Unlock of a Resource that is not Locked", "description": "The product attempts to unlock a resource that is not locked.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Other:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Modify Memory:IMPACT:Other:NOTE:Depending on the locking functionality, an unlock of a non-locked resource might corrupt the state of the product, possibly including denial of service, memory corruption, or other modification to the resource (or its associated metadata that is used for tracking locks). In some cases, an unlock operation might not have any adverse effects.::", "mitigations": ""}
{"id": "CWE-833", "name": "Deadlock", "description": "The product contains multiple threads or executable segments that are waiting for each other to release a necessary lock, resulting in deadlock.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Other):IMPACT:DoS: Crash, Exit, or Restart:NOTE:Each thread of execution will hang and prevent tasks from completing. In some cases, CPU consumption may occur if a lock check occurs in a tight loop.::", "mitigations": ""}
{"id": "CWE-835", "name": "Loop with Unreachable Exit Condition", "description": "The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Amplification:NOTE:An infinite loop will cause unexpected consumption of resources, such as CPU cycles or memory. The software's operation may slow down, or cause a long time to respond.::", "mitigations": ""}
{"id": "CWE-836", "name": "Use of Password Hash Instead of Password for Authentication", "description": "The product includes a client that computes a hash of a password and sends the hash to another component, which compares the supplied hash to the hash obtained from a data store of password hashes.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Authentication:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:An attacker could bypass the authentication routine without knowing the original password. The attacker could obtain a copy of the hash (e.g., through a separate weakness against a database of authentication credentials), then use a modified client to replay the stolen hash. As a result, the server-side comparison against a client-side hash does not provide any more security than the use of passwords without hashing.::", "mitigations": ""}
{"id": "CWE-837", "name": "Improper Enforcement of a Single, Unique Action", "description": "The product requires that an actor should only be able to perform an action once, or to have only one unique action, but the product does not enforce or incorrectly enforces this restriction.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:An attacker might be able to gain advantage over other users by performing the action multiple times, or affect the correctness of the product.::", "mitigations": ""}
{"id": "CWE-838", "name": "Inappropriate Encoding for Output Context", "description": "The product uses or specifies an encoding when generating output to a downstream component, but the specified encoding is not the same as the encoding that is expected by the downstream component.", "extended": "Using the correct output encoding is essential for ensuring that communications between components are accurate. For example, HTML entity encoding is used for elements in the HTML body of a web page. However, a programmer might use entity encoding when generating output that is used within an attribute of an HTML tag, which could contain functional Javascript that is not affected by the HTML encoding. While web applications have received the most attention for this problem, this weakness could potentially apply to any type of product that uses a communications stream that could support multiple encodings.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could modify the structure of the message or data being sent to the downstream component. When the wrong encoding is used - even if closely related - the downstream component could decode the data incorrectly and misinterpret the output. This can have security consequences when the provided boundaries between control and data are inadvertently broken, because the resulting data could introduce control characters or special elements that were not sent by the product. The resulting data could then be used to bypass protection mechanisms such as input validation, and enable injection attacks.::", "mitigations": "::PHASE:Implementation:STRATEGY:Output Encoding:DESCRIPTION:Use context-aware encoding. That is, understand which encoding is being used by the downstream component, and ensure that this encoding is used. If an encoding can be specified, do so, instead of assuming that the default encoding is the same as the default being assumed by the downstream component.::PHASE:Architecture and Design:STRATEGY:Output Encoding:DESCRIPTION:Where possible, use communications protocols or data formats that provide strict boundaries between control and data. If this is not feasible, ensure that the protocols or formats allow the communicating components to explicitly state which encoding/decoding method is being used. Some template frameworks provide built-in support.::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. Note that some template mechanisms provide built-in support for the appropriate encoding.::"}
{"id": "CWE-839", "name": "Numeric Range Comparison Without Minimum Check", "description": "The product checks a value to ensure that it is less than or equal to a maximum, but it does not also verify that the value is greater than or equal to the minimum.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Modify Memory:IMPACT:Read Memory:NOTE:If a negative value is used to access memory, buffers, or other indexable structures, it could access memory outside the bounds of the buffer.::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):NOTE:In some contexts, a negative value could lead to resource consumption, e.g., if the negative value is used for memory allocation.::SCOPE:Integrity:SCOPE:Confidentiality:SCOPE:Availability:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could modify the structure of the message or data being sent to the downstream component, possibly injecting commands.::SCOPE:Integrity:IMPACT:Varies by Context:IMPACT:Unexpected State:NOTE:The use of a negative number in a positive-only context could have security implications for other types of resources. For example, a shopping cart might check that the user is not requesting m", "mitigations": "::PHASE:Implementation:STRATEGY:Enforcement by Conversion:DESCRIPTION:If the number to be used is always expected to be positive, change the variable type from signed to unsigned or size_t.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:If the number to be used could have a negative value based on the specification (thus requiring a signed value), but the number should only be positive to preserve code correctness, then include a check to ensure that the value is positive.::"}
{"id": "CWE-841", "name": "Improper Enforcement of Behavioral Workflow", "description": "The product supports a session in which more than one behavior must be performed by an actor, but it does not properly ensure that the actor performs the behaviors in the required sequence or timeframe.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Alter Execution Logic:IMPACT:Unexpected State:NOTE:By performing actions in an unexpected order, or by omitting steps, an attacker could manipulate the business logic of the product or cause it to enter an invalid state. In some cases, this can also expose resultant weaknesses with security implications.::", "mitigations": ""}
{"id": "CWE-842", "name": "Placement of User into Incorrect Group", "description": "The product or the administrator places a user into an incorrect group.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:NOTE:If the incorrect group has more access or privileges than the intended group, the user might be able to bypass intended security policy to access unexpected resources or perform unexpected actions. The access-control system might not be able to detect malicious usage of this group membership.::", "mitigations": ""}
{"id": "CWE-843", "name": "Access of Resource Using Incompatible Type", "description": "The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:When the product accesses the resource using an incompatible type, this could trigger logical errors because the resource does not have expected properties.::SCOPE:Availability:SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Read Memory:IMPACT:Modify Memory:IMPACT:Execute Unauthorized Code or Commands:IMPACT:DoS: Crash, Exit, or Restart:NOTE:If a memory buffer is accessed using an incompatible type, and the allocated buffer is smaller than the type that the code is attempting to access, then an attacker could read or write memory outside the bounds of the buffer, leading to a crash or possibly code execution.::", "mitigations": ""}
{"id": "CWE-908", "name": "Use of Uninitialized Resource", "description": "The product uses or accesses a resource that has not been initialized.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Memory:IMPACT:Read Application Data:NOTE:When reusing a resource such as memory or a program variable, the original contents may not have been cleared before it is sent to an untrusted party.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:IMPACT:DoS: Instability:NOTE:The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend, possibly leading to a crash.::SCOPE:Other:IMPACT:Unexpected State:IMPACT:Varies by Context:NOTE:The consequences vary depending on the type of resource and how it is used within the product.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all required steps.::PHASE:Implementation:DESCRIPTION:Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.::PHASE:Implementation:DESCRIPTION:Avoid race conditions (CWE-362) during initialization routines.::PHASE:Build and Compilation:DESCRIPTION:Run or compile the product with settings that generate warnings about uninitialized variables or data.::"}
{"id": "CWE-909", "name": "Missing Initialization of Resource", "description": "The product does not initialize a critical resource.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:If a resource is not initialized, it could contain unpredictable or expired data, or it could be initialized to defaults that are invalid. This can have security implications when the resource is expected to have certain properties or values.::SCOPE:Confidentiality:IMPACT:Read Memory:IMPACT:Read Application Data:NOTE:When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all specified steps.::PHASE:Implementation:DESCRIPTION:Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.::PHASE:Implementation:DESCRIPTION:Avoid race conditions (CWE-362) during initialization routines.::PHASE:Build and Compilation:DESCRIPTION:Run or compile your product with settings that generate warnings about uninitialized variables or data.::"}
{"id": "CWE-910", "name": "Use of Expired File Descriptor", "description": "The product uses or accesses a file descriptor after it has been closed.", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Files or Directories:IMPACT:Modify Files or Directories:NOTE:The reused file descriptor might reference a different file or device than the original file descriptor. As a result, the program could read data from, or write data to, the wrong file.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:Accessing a file descriptor that has been closed can cause a crash.::", "mitigations": ""}
{"id": "CWE-911", "name": "Improper Update of Reference Count", "description": "The product uses a reference count to manage a resource, but it does not update or incorrectly updates the reference count.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):LIKELIHOOD:High:NOTE:If an adversary can prevent a reference count from reaching zero, then resources might not be released when they are supposed to, thus causing resources to become scarce for future needs.::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:LIKELIHOOD:Low:NOTE:If an adversary can cause a reference count to reach zero when the resource is still in use, then a resource might be released before it is supposed to be, possibly forcing an error that causes the product to crash or exit out of its current operation.::", "mitigations": ""}
{"id": "CWE-914", "name": "Improper Control of Dynamically-Identified Variables", "description": "The product does not properly restrict reading from or writing to dynamically-identified variables.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:An attacker could modify sensitive data or critical program variables.::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands::SCOPE:Other:SCOPE:Integrity:IMPACT:Varies by Context:IMPACT:Alter Execution Logic::", "mitigations": "::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:For any externally-influenced input, check the input against an allowlist of internal program variables that are allowed to be modified.::PHASE:Implementation Architecture and Design:STRATEGY:Refactoring:DESCRIPTION:Refactor the code so that internal program variables do not need to be dynamically identified.::"}
{"id": "CWE-915", "name": "Improperly Controlled Modification of Dynamically-Determined Object Attributes", "description": "The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Modify Application Data:NOTE:An attacker could modify sensitive data or program variables.::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands::SCOPE:Other:SCOPE:Integrity:IMPACT:Varies by Context:IMPACT:Alter Execution Logic::", "mitigations": "::PHASE:Implementation:DESCRIPTION:If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists. For applications written with Ruby on Rails, use the attr_accessible (allowlist) or attr_protected (denylist) macros in each class that may be used in mass assignment.::PHASE:Architecture and Design Implementation:DESCRIPTION:If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:For any externally-influenced input, check the input against an allowlist of internal object attributes or fields that are allowed to be modified.::PHASE:Implementation Architecture and Design:STRATEGY:Refactoring:DESCRIPTION:Refactor the code so that object attributes or fields do not need to be dynamically identified, and only expose getter/setter functionality for the intended attributes.::"}
{"id": "CWE-916", "name": "Use of Password Hash With Insufficient Computational Effort", "description": "The product generates a hash for a password, but it uses a scheme that does not provide a sufficient level of computational effort that would make password cracking attacks infeasible or expensive.", "extended": "Many password storage mechanisms compute a hash and store the hash, instead of storing the original password in plaintext. In this design, authentication involves accepting an incoming password, computing its hash, and comparing it to the stored hash. Many hash algorithms are designed to execute quickly with minimal overhead, even cryptographic hashes. However, this efficiency is a problem for password storage, because it can reduce an attacker's workload for brute-force password cracking. If an attacker can obtain the hashes through some other method (such as SQL injection on a database that stores hashes), then the attacker can store the hashes offline and use various techniques to crack the passwords by computing hashes efficiently. Without a built-in workload, modern attacks can compute large numbers of hashes, or even exhaust the entire space of all possible passwords, within a very short amount of time, using massively-parallel computing (such as cloud computing) and GPU, ASIC, or FPGA hardware. In such a scenario, an efficient hash algorithm helps the attacker. There are several properties of a hash scheme that are relevant to its strength against an offline, massively-parallel attack: The amount of CPU time required to compute the hash (stretching) The amount of memory required to compute the hash (memory-hard operations) Including a random value, along with the password, as input to the hash computation (salting) Given a hash, there is no known way of determining an input (e.g., a password) that produces this hash value, other than by guessing possible inputs (one-way hashing) Relative to the number of all possible hashes that can be generated by the scheme, there is a low likelihood of producing the same hash for multiple different inputs (collision resistance) Note that the security requirements for the product may vary depending on the environment and the value of the passwords. Different schemes might not provide all of these properties, yet may still p", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:If an attacker can gain access to the hashes, then the lack of sufficient computational effort will make it easier to conduct brute force attacks using techniques such as rainbow tables, or specialized hardware such as GPUs, which can be much faster than general-purpose CPUs for computing hashes.::", "mitigations": "::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::PHASE:Implementation Architecture and Design:DESCRIPTION:When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive s"}
{"id": "CWE-917", "name": "Improper Neutralization of Special Elements used in an Expression Language Statement", "description": "The product constructs all or part of an expression language (EL) statement in a framework such as a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:An attacker could insert an expression that references private data, which is then included in the output.::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands:NOTE:An attacker could execute arbitrary expressions.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Avoid adding user-controlled data into an expression interpreter when possible.::PHASE:Implementation:DESCRIPTION:If user-controlled data must be added to an expression interpreter, one or more of the following should be performed: Validate that the user input will not evaluate as an expression Encode the user input in a way that ensures it is not evaluated as an expression::PHASE:System Configuration Operation:DESCRIPTION:The framework or tooling might allow the developer to disable or deactivate the processing of EL expressions, such as setting the isELIgnored attribute for a JSP page to true.::"}
{"id": "CWE-918", "name": "Server-Side Request Forgery", "description": "The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:By providing URLs to unexpected hosts or ports, attackers can make it appear that the server is sending the request, possibly bypassing access controls such as firewalls that prevent the attackers from accessing the URLs directly. The server can be used as a proxy to conduct port scanning of hosts in internal networks, use other URLs such as that can access documents on the system (using file://), or use other protocols such as gopher:// or tftp://, which may provide greater control over the contents of requests.::", "mitigations": "::PHASE:Implementation Operation:DESCRIPTION:If there is a known list of applications, IP, hostname, and/or domains to which the product is allowed to communicate, then use allowlists to ensure that outgoing requests are restricted to these known entities. The allowlists could be in the application code or possibly enforced by firewalls or network segmentation [REF-1511].::PHASE:Implementation Operation:DESCRIPTION:If the product is expected to be able to connect to arbitrary IP addresses or domains, consider using a denylist that includes private network addresses, internal domain names, etc. The denylist could be in the application code or possibly enforced by firewalls or network segmentation [REF-1511].:EFFECTIVENESS:Moderate::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 con"}
{"id": "CWE-920", "name": "Improper Restriction of Power Consumption", "description": "The product operates in an environment in which power is a limited resource that cannot be automatically replenished - or has financial restrictions - but the product does not properly restrict the amount of power that its operation consumes.", "extended": "In environments such as embedded or mobile devices, power can be a limited resource such as a battery, which cannot be automatically replenished by the product itself, and the device might not always be directly attached to a reliable power source. If the product uses too much power too quickly, then this could cause the device (and subsequently, the product) to stop functioning until power is restored, or increase the financial burden on the device owner because of increased power costs.", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (Other):IMPACT:DoS: Crash, Exit, or Restart:NOTE:Normal operation of a device or application will consume power. However, in some cases, an attacker could cause the product/device to consumer power than intended. The power source could be drained, causing the application - and the entire device - to cease functioning.::", "mitigations": ""}
{"id": "CWE-921", "name": "Storage of Sensitive Data in a Mechanism without Access Control", "description": "The product stores sensitive information in a file system or device that does not have built-in access control.", "extended": "While many modern file systems or devices utilize some form of access control in order to restrict access to data, not all storage mechanisms have this capability. For example, memory cards, floppy disks, CDs, and USB devices are typically made accessible to any user within the system. This can become a problem when sensitive data is stored in these mechanisms in a multi-user environment, because anybody on the system can read or write this data. On Android devices, external storage is typically globally readable and writable by other applications on the device. External storage may also be easily accessible through the mobile device's USB connection or physically accessible through the device's memory card port.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Read Files or Directories:NOTE:Attackers can read sensitive information by accessing the unrestricted storage mechanism.::SCOPE:Integrity:IMPACT:Modify Application Data:IMPACT:Modify Files or Directories:NOTE:Attackers can modify or delete sensitive information by accessing the unrestricted storage mechanism.::", "mitigations": ""}
{"id": "CWE-924", "name": "Improper Enforcement of Message Integrity During Transmission in a Communication Channel", "description": "The product establishes a communication channel with an endpoint and receives a message from that endpoint, but it does not sufficiently ensure that the message was not modified during transmission.", "extended": "", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Gain Privileges or Assume Identity:NOTE:Attackers might be able to modify the message and spoof the endpoint by interfering with the data as it crosses the network or by redirecting the connection to a system under their control. If an attacker can spoof the endpoint, they might gain all the privileges that were intended for the original endpoint.::", "mitigations": ""}
{"id": "CWE-939", "name": "Improper Authorization in Handler for Custom URL Scheme", "description": "The product uses a handler for a custom URL scheme, but it does not properly restrict which actors can invoke the handler using the scheme.", "extended": "Mobile platforms and other architectures allow the use of custom URL schemes to facilitate communication between applications. In the case of iOS, this is the only method to do inter-application communication. The implementation is at the developer's discretion which may open security flaws in the application. An example could be potentially dangerous functionality such as modifying files through a custom URL scheme.", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:IMPACT:Bypass Protection Mechanism:NOTE:An attacker can access any functionality that is inadvertently accessible to the source.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Utilize a user prompt pop-up to authorize potentially harmful actions such as those modifying data or dealing with sensitive information. When designing functionality of actions in the URL scheme, consider whether the action should be accessible to all mobile applications, or if an allowlist of applications to interface with is appropriate.::"}
{"id": "CWE-940", "name": "Improper Verification of Source of a Communication Channel", "description": "The product establishes a communication channel to handle an incoming request that has been initiated by an actor, but it does not properly verify that the request is coming from the expected origin.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:IMPACT:Bypass Protection Mechanism:NOTE:An attacker from an untrusted origin could successfully establish a communication channel. The attacker could then gain privileges and access unexpected functionality that was only intended for trusted sources.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use a mechanism that can validate the identity of the source, such as a certificate, and validate the integrity of data to ensure that it cannot be modified in transit using an Adversary-in-the-Middle (AITM) attack. When designing functionality of actions in the URL scheme, consider whether the action should be accessible to all mobile applications, or if an allowlist of applications to interface with is appropriate.::"}
{"id": "CWE-941", "name": "Incorrectly Specified Destination in a Communication Channel", "description": "The product creates a communication channel to initiate an outgoing request to an actor, but it does not correctly specify the intended destination for that actor.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Varies by Context:IMPACT:Bypass Protection Mechanism:NOTE:An attacker at the destination may be able to spoof trusted servers to steal data or cause a denial of service. The attacker can access any functionality that is inadvertently accessible to the source. If the product allows an attacker to control/specify the destination, then the attacker can cause it to connect to an untrusted or malicious destination. For example, because UDP is a connectionless protocol, UDP packets can be spoofed by specifying a false source address in the packet; when the server receives the packet and sends a reply, it will specify a destination by using the source of the incoming packet - i.e., the false source. The server can then be tricked into sending traffic to the wrong host, which is effective for hiding the real source of an attack and for conducting a distributed denial of service (DDoS). As another example, serve", "mitigations": ""}
{"id": "CWE-1007", "name": "Insufficient Visual Distinction of Homoglyphs Presented to User", "description": "The product displays information or identifiers to a user, but the display mechanism does not make it easy for the user to distinguish between visually similar or identical glyphs (homoglyphs), which may cause the user to misinterpret a glyph and perform an unintended, insecure action.", "extended": "Adversaries can exploit this visual similarity for attacks such as phishing, e.g. by providing a link to an attacker-controlled hostname that looks like a hostname that the victim trusts. In a different use of homoglyphs, an adversary may create a back door username that is visually similar to the username of a regular user, which then makes it more difficult for a system administrator to detect the malicious username while reviewing logs.", "consequences": "::SCOPE:Integrity:SCOPE:Confidentiality:IMPACT:Other:IMPACT:Varies by Context:IMPACT:Hide Activities:NOTE:An attacker may ultimately redirect a user to a malicious website, by deceiving the user into believing the URL they are accessing is a trusted domain. However, the attack can also be used to forge log entries by using homoglyphs in usernames. Homoglyph manipulations are often the first step towards executing advanced attacks such as stealing a user's credentials, Cross-Site Scripting (XSS), or log forgery. If an attacker redirects a user to a malicious site, the attacker can mimic a trusted domain to steal account credentials and perform actions on behalf of the user, without the user's knowledge. Similarly, an attacker could create a username for a website that contains homoglyph characters, making it difficult for an admin to review logs and determine which users performed which actions.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use a browser that displays Punycode for IDNs in the URL and status bars, or which color code various scripts in URLs. Due to the prominence of homoglyph attacks, several browsers now help safeguard against this attack via the use of Punycode. For example, Mozilla Firefox and Google Chrome will display IDNs as Punycode if top-level domains do not restrict which characters can be used in domain names or if labels mix scripts for different languages.::PHASE:Implementation:DESCRIPTION:Use an email client that has strict filters and prevents messages that mix character sets to end up in a user's inbox. Certain email clients such as Google's GMail prevent the use of non-Latin characters in email addresses or in links contained within emails. This helps prevent homoglyph attacks by flagging these emails and redirecting them to a user's spam folder.::"}
{"id": "CWE-1021", "name": "Improper Restriction of Rendered UI Layers or Frames", "description": "The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:An attacker can trick a user into performing actions that are masked and hidden from the user's view. The impact varies widely, depending on the functionality of the underlying application. For example, in a social media application, clickjacking could be used to trick the user into changing privacy settings.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use the frame-ancestors directive in the Content Security Policy, which is intended to define restrictions when it comes to allowing embedded content [REF-1544].:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:The use of X-Frame-Options (now partially obsolete as of September 2026 [REF-1545]) allows developers of web content to restrict the usage of their application within the form of overlays, frames, or iFrames. The developer can indicate from which domains can frame the content. The concept of X-Frame-Options is well documented, but implementation of this protection mechanism is in development to cover gaps; often, there is a need for allowing frames from multiple domains.::PHASE:Implementation:DESCRIPTION:Use a frame-breaker script in each page that should not be framed. This is very helpful for legacy browsers that do not support the X-Frame-Options security feature previously mentioned (which is now partially obsolete).::PHASE:Implementation:DESCRIPTION:In addition to frames or iframes as previously mentioned, the web application is expected to place restrictions on whether it is allowed to be rendered within objects, embed, or applet elements.::"}
{"id": "CWE-1024", "name": "Comparison of Incompatible Types", "description": "The product performs a comparison between two entities, but the entities are of different, incompatible types that cannot be guaranteed to provide correct results when they are directly compared.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-1025", "name": "Comparison Using Wrong Factors", "description": "The code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:This can lead to incorrect results and resultant weaknesses. For example, the code might inadvertently compare references to objects, instead of the relevant contents of those objects, causing two equal objects to be considered unequal.::", "mitigations": ""}
{"id": "CWE-1037", "name": "Processor Optimization Removal or Modification of Security-critical Code", "description": "The developer builds a security-critical protection mechanism into the software, but the processor optimizes the execution of the program such that the mechanism is removed or modified.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:LIKELIHOOD:High:NOTE:A successful exploitation of this weakness will change the order of an application's execution and will likely be used to bypass specific protection mechanisms. This bypass can be exploited further to potentially read data that should otherwise be unaccessible.::", "mitigations": ""}
{"id": "CWE-1041", "name": "Use of Redundant Code", "description": "The product has multiple functions, methods, procedures, macros, etc. that contain the same code, i.e., the code has been copied or duplicated.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. For example, if there are two copies of the same code, the programmer might fix a weakness in one copy while forgetting to fix the same weakness in another copy.::", "mitigations": "::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:Merge common functionality into a single function and then call that function from across the entire code base.::"}
{"id": "CWE-1043", "name": "Data Element Aggregating an Excessively Large Number of Non-Primitive Elements", "description": "The product uses a data element that has an excessively large number of sub-elements with non-primitive data types such as structures or aggregated objects.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1044", "name": "Architecture with Number of Horizontal Layers Outside of Expected Range", "description": "The product's architecture contains too many - or too few - horizontal layers.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1045", "name": "Parent Class with a Virtual Destructor and a Child Class without a Virtual Destructor", "description": "A parent class has a virtual destructor method, but the parent has a child class that does not have a virtual destructor.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably, since the child might not perform essential destruction operations. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability, such as a memory leak (CWE-401).::", "mitigations": ""}
{"id": "CWE-1046", "name": "Creation of Immutable Text Using String Concatenation", "description": "The product creates an immutable text string using string concatenation operations.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:When building a string via a looping feature (e.g., a FOR or WHILE loop), the use of += to append to the existing string will result in the creation of a new object with each iteration, which can be inefficient in comparison with use of text buffer data elements. This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this could be influenced to create performance problems.::", "mitigations": ""}
{"id": "CWE-1047", "name": "Modules with Circular Dependencies", "description": "The product contains modules in which one module has references that cycle back to itself, i.e., there are circular dependencies.", "extended": "As an example, with Java, this weakness might indicate cycles between packages.", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product due to insufficient modularity, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It can also prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1048", "name": "Invokable Control Element with Large Number of Outward Calls", "description": "The code contains callable control elements that contain an excessively large number of references to other application objects external to the context of the callable, i.e. a Fan-Out value that is excessively large.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1049", "name": "Excessive Data Query Operations in a Large Data Table", "description": "The product performs a data query with a large number of joins and sub-queries on a large data table.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1050", "name": "Excessive Platform Resource Consumption within a Loop", "description": "The product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If an attacker can influence the number of iterations in the loop, then this performance problem might allow a denial of service by consuming more platform resources than intended.::", "mitigations": ""}
{"id": "CWE-1051", "name": "Initialization with Hard-Coded Network Resource Configuration Data", "description": "The product initializes data using hard-coded values that act as network resource identifiers.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably, e.g. if it runs in an environment does not use the hard-coded network resource identifiers. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1052", "name": "Excessive Use of Hard-Coded Literals in Initialization", "description": "The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to modify or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1053", "name": "Missing Documentation for Design", "description": "The product does not have documentation that represents how it is designed.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue can make it more difficult to understand and maintain the product. It can make it more difficult and time-consuming to detect and/or fix vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1054", "name": "Invocation of a Control Element at an Unnecessarily Deep Horizontal Layer", "description": "The code at one architectural layer invokes code that resides at a deeper layer than the adjacent layer, i.e., the invocation skips at least one layer, and the invoked code is not part of a vertical utility layer that can be referenced from any horizontal layer.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1055", "name": "Multiple Inheritance from Concrete Classes", "description": "The product contains a class with inheritance from more than one concrete class.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1056", "name": "Invokable Control Element with Variadic Parameters", "description": "A named-callable or method control element has a signature that supports a variable (variadic) number of parameters or arguments.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability. With variadic arguments, it can be difficult or inefficient for manual analysis to be certain of which function/method is being invoked.::", "mitigations": ""}
{"id": "CWE-1057", "name": "Data Access Operations Outside of Expected Data Manager Component", "description": "The product uses a dedicated, central data manager component as required by design, but it contains code that performs data-access operations that do not use this data manager.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly than intended, since the intended central data manager may have been explicitly optimized for performance or other quality characteristics. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1058", "name": "Invokable Control Element in Multi-Thread Context with non-Final Static Storable or Member Element", "description": "The code contains a function or method that operates in a multi-threaded environment but owns an unsafe non-final static storable or member data element.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1060", "name": "Excessive Number of Inefficient Server-Side Data Accesses", "description": "The product performs too many data queries without using efficient data processing functionality such as stored procedures.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly due to computational expense. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1062", "name": "Parent Class with References to Child Class", "description": "The code has a parent class that contains references to a child class, its methods, or its members.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1063", "name": "Creation of Class Instance within a Static Code Block", "description": "A static code block creates an instance of a class.", "extended": "This pattern identifies situations where a storable data element or member data element is initialized with a value in a block of code which is declared as static.", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly by performing initialization before it is needed. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1064", "name": "Invokable Control Element with Signature Containing an Excessive Number of Parameters", "description": "The product contains a function, subroutine, or method whose signature has an unnecessarily large number of parameters/arguments.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1065", "name": "Runtime Resource Management Control Element in a Component Built to Run on Application Servers", "description": "The product uses deployed components from application servers, but it also uses low-level functions/methods for management of resources, instead of the API provided by the application server.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1066", "name": "Missing Serialization Control Element", "description": "The product contains a serializable data element that does not have an associated serialization method.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably, e.g. by triggering an exception. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1067", "name": "Excessive Execution of Sequential Searches of Data Resource", "description": "The product contains a data query against an SQL table or view that is configured in a way that does not utilize an index and may cause sequential searches to be performed.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1068", "name": "Inconsistency Between Implementation and Documented Design", "description": "The implementation of the product is not consistent with the design as described within the relevant documentation.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product due to inconsistencies, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1070", "name": "Serializable Data Element Containing non-Serializable Item Elements", "description": "The product contains a serializable, storable data element such as a field or member, but the data element contains member elements that are not serializable.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1071", "name": "Empty Code Block", "description": "The source code contains a block that does not contain any code, i.e., the block is empty.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:IMPACT:Varies by Context:NOTE:The lack of any behavior within the block might violate a convention or API in such a way that it is an error. It could indicate a situation in which some kind of action should be taken.::", "mitigations": ""}
{"id": "CWE-1072", "name": "Data Resource Access without Use of Connection Pooling", "description": "The product accesses a data resource through a database without using a connection pooling capability.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly, as connection pools allow connections to be reused without the overhead and time consumption of opening and closing a new connection. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1073", "name": "Non-SQL Invokable Control Element with Excessive Number of Data Resource Accesses", "description": "The product contains a client with a function or method that contains a large number of data accesses/queries that are sent through a data manager, i.e., does not use efficient database capabilities.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1074", "name": "Class with Excessively Deep Inheritance", "description": "A class has an inheritance level that is too high, i.e., it has a large number of parent classes.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1075", "name": "Unconditional Control Flow Transfer outside of Switch Block", "description": "The product performs unconditional control transfer (such as a goto) in code outside of a branching structure such as a switch block.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1079", "name": "Parent Class without Virtual Destructor Method", "description": "A parent class contains one or more child classes, but the parent class does not have a virtual destructor method.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably due to undefined or unexpected behaviors. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1080", "name": "Source Code File with Excessive Number of Lines of Code", "description": "A source code file has too many lines of code.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1082", "name": "Class Instance Self Destruction Control Element", "description": "The code contains a class instance that calls the method or function to delete or destroy itself, e.g., use of delete this in C++.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1083", "name": "Data Access from Outside Expected Data Manager Component", "description": "The product is intended to manage data access through a particular data manager component such as a relational or non-SQL database, but it contains code that performs data access operations without using that component.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:If a data access operation is performed outside of that component, then this may indicate a violation of the intended design. This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1084", "name": "Invokable Control Element with Excessive File or Data Access Operations", "description": "A function or method contains too many operations that utilize a data manager or file resource.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1085", "name": "Invokable Control Element with Excessive Volume of Commented-out Code", "description": "A function, method, procedure, etc. contains an excessive amount of code that has been commented out within its body.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1086", "name": "Class with Excessive Number of Child Classes", "description": "A class contains an unnecessarily large number of child classes.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and maintain the software, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1087", "name": "Class with Virtual Method without a Virtual Destructor", "description": "A class contains a virtual method, but the method does not have an associated virtual destructor.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably, e.g. due to undefined behavior. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1089", "name": "Large Data Table with Excessive Number of Indices", "description": "The product uses a large data table that contains an excessively large number of indices.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1090", "name": "Method Containing Access of a Member Element from Another Class", "description": "A method for a class performs an operation that directly accesses a member element from another class.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue suggests poor encapsulation and makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1092", "name": "Use of Same Invokable Control Element in Multiple Architectural Layers", "description": "The product uses the same control element across multiple architectural layers.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1094", "name": "Excessive Index Range Scan for a Data Resource", "description": "The product contains an index range scan for a large data table, but the scan can cover a large number of rows.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Performance:NOTE:This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1095", "name": "Loop Condition Value Update within the Loop", "description": "The product uses a loop with a control flow condition based on a value that is updated within the body of the loop.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1097", "name": "Persistent Storable Data Element without Associated Comparison Control Element", "description": "The product uses a storable data element that does not have all of the associated functions or methods that are necessary to support comparison.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably, due to incorrect or unexpected comparison results. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1098", "name": "Data Element containing Pointer Item without Proper Copy Control Element", "description": "The code contains a data element with a pointer that does not have an associated copy or constructor method.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Reliability:NOTE:This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.::", "mitigations": ""}
{"id": "CWE-1099", "name": "Inconsistent Naming Conventions for Identifiers", "description": "The product's code, documentation, or other artifacts do not consistently use the same naming conventions for variables, callables, groups of related callables, I/O capabilities, data types, file names, or similar types of elements.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product due to inconsistencies, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1100", "name": "Insufficient Isolation of System-Dependent Functions", "description": "The product or code does not isolate system-dependent functionality into separate standalone modules.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain and/or port the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1101", "name": "Reliance on Runtime Component in Generated Code", "description": "The product uses automatically-generated code that cannot be executed without a specific runtime support component.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1102", "name": "Reliance on Machine-Dependent Data Representation", "description": "The code uses a data representation that relies on low-level data representation or constructs that may vary across different processors, physical machines, OSes, or other physical components.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain and/or port the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1103", "name": "Use of Platform-Dependent Third Party Components", "description": "The product relies on third-party components that do not provide equivalent functionality across all desirable platforms.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1104", "name": "Use of Unmaintained Third Party Components", "description": "The product relies on third-party components that are not actively supported or maintained by the original developer or a trusted proxy for the original developer.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Varies by Context:NOTE:Relying on unmaintained components makes it difficult or impossible to fix significant bugs and vulnerabilities, can render code obsolete, and undermine security by complicating maintenance and increasing the risk of new vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1105", "name": "Insufficient Encapsulation of Machine-Dependent Functionality", "description": "The product or code uses machine-dependent functionality, but it does not sufficiently encapsulate or isolate this functionality from the rest of the code.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to port or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1106", "name": "Insufficient Use of Symbolic Constants", "description": "The source code uses literal constants that may need to change or evolve over time, instead of using symbolic constants.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1107", "name": "Insufficient Isolation of Symbolic Constant Definitions", "description": "The source code uses symbolic constants, but it does not sufficiently place the definitions of these constants into a more centralized or isolated location.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1108", "name": "Excessive Reliance on Global Variables", "description": "The code is structured in a way that relies too much on using or setting global variables throughout various points in the code, instead of preserving the associated information in a narrower, more local context.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1109", "name": "Use of Same Variable for Multiple Purposes", "description": "The code contains a callable, block, or other code element in which the same variable is used to control more than one unique task or store more than one instance of data.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:Use of the same variable for multiple purposes can make it more difficult for a person to read or understand the code, potentially hiding other quality issues.::", "mitigations": ""}
{"id": "CWE-1110", "name": "Incomplete Design Documentation", "description": "The product's design documentation does not adequately describe control flow, data flow, system initialization, relationships between tasks, components, rationales, or other important aspects of the design.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability::SCOPE:Other:IMPACT:Increase Analytical Complexity::", "mitigations": ""}
{"id": "CWE-1111", "name": "Incomplete I/O Documentation", "description": "The product's documentation does not adequately define inputs, outputs, or system/software interfaces.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability::SCOPE:Other:IMPACT:Increase Analytical Complexity::", "mitigations": ""}
{"id": "CWE-1112", "name": "Incomplete Documentation of Program Execution", "description": "The document does not fully define all mechanisms that are used to control or influence how product-specific programs are executed, such as environmental variables, configuration files, registry keys, command-line switches or options, or system settings.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability::SCOPE:Other:IMPACT:Increase Analytical Complexity::", "mitigations": ""}
{"id": "CWE-1113", "name": "Inappropriate Comment Style", "description": "The source code uses comment styles or formats that are inconsistent or do not follow expected standards for the product.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to maintain the product due to insufficient legibility, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1114", "name": "Inappropriate Whitespace Style", "description": "The source code contains whitespace that is inconsistent across the code or does not follow expected standards for the product.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:A human auditor might indirectly trust that whitespace (especially indentation) reflects the actual control flow of the code, which could make it more difficult to find vulnerabilities.::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1115", "name": "Source Code Element without Standard Prologue", "description": "The source code contains elements such as source files that do not consistently provide a prologue or header that has been standardized for the project.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product due to insufficient analyzability, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:The lack of a prologue can make it more difficult to accurately and quickly understand the associated code.::", "mitigations": ""}
{"id": "CWE-1116", "name": "Inaccurate Source Code Comments", "description": "The source code contains comments that do not accurately describe or explain aspects of the portion of the code with which the comment is associated.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:When a comment does not accurately reflect the associated code elements, this can introduce confusion to a reviewer (due to inconsistencies) or make it more difficult and less efficient to validate that the code is implementing the intended behavior correctly.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Verify that each comment accurately reflects what is intended to happen during execution of the code.::"}
{"id": "CWE-1117", "name": "Callable with Insufficient Behavioral Summary", "description": "The code contains a function or method whose signature and/or associated inline documentation does not sufficiently describe the callable's inputs, outputs, side effects, assumptions, or return codes.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1118", "name": "Insufficient Documentation of Error Handling Techniques", "description": "The documentation does not sufficiently describe the techniques that are used for error handling, exception processing, or similar mechanisms.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability::", "mitigations": "::PHASE:Documentation:DESCRIPTION:Documentation may need to cover error handling techniques at multiple layers, such as module, executable, compilable code unit, or callable.::"}
{"id": "CWE-1119", "name": "Excessive Use of Unconditional Branching", "description": "The code uses too many unconditional branches (such as goto).", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1121", "name": "Excessive McCabe Cyclomatic Complexity", "description": "The code contains McCabe cyclomatic complexity that exceeds a desirable maximum.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1122", "name": "Excessive Halstead Complexity", "description": "The code is structured in a way that a Halstead complexity measure exceeds a desirable maximum.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1123", "name": "Excessive Use of Self-Modifying Code", "description": "The product uses too much self-modifying code.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1124", "name": "Excessively Deep Nesting", "description": "The code contains a callable or other code grouping in which the nesting / branching is too deep.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1125", "name": "Excessive Attack Surface", "description": "The product has an attack surface whose quantitative measurement exceeds a desirable maximum.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": ""}
{"id": "CWE-1126", "name": "Declaration of Variable with Unnecessarily Wide Scope", "description": "The source code declares a variable in one scope, but the variable is only used within a narrower scope.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:IMPACT:Increase Analytical Complexity:NOTE:This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::", "mitigations": ""}
{"id": "CWE-1127", "name": "Compilation with Insufficient Warnings or Errors", "description": "The code is compiled without sufficient warnings enabled.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.::SCOPE:Other:IMPACT:Increase Analytical Complexity:NOTE:This issue may prevent the detection of subtle bugs or quality issues.::", "mitigations": "::PHASE:Build and Compilation:DESCRIPTION:Compile the code with the best options available to generate the most warnings that are actionable.::"}
{"id": "CWE-1173", "name": "Improper Use of Validation Framework", "description": "The product does not use, or incorrectly uses, an input validation framework that is provided by the source language, framework, or an independent library.", "extended": "", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State:NOTE:Unchecked input leads to cross-site scripting, process control, and SQL injection vulnerabilities, among others.::SCOPE:Other:IMPACT:Reduce Maintainability:NOTE:Not using provided input validation frameworks can hurt the maintainability of code, since future developers may not recognize the downstream input validation that is required or expected in place of a validation framework.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Properly use provided input validation frameworks.::"}
{"id": "CWE-1188", "name": "Initialization of a Resource with an Insecure Default", "description": "The product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:The impact of insecure defaults varies widely depending on the functionality that the product controls.::", "mitigations": ""}
{"id": "CWE-1204", "name": "Generation of Weak Initialization Vector (IV)", "description": "The product uses a cryptographic primitive that uses an Initialization Vector (IV), but the product does not generate IVs that are sufficiently unpredictable or unique according to the expected cryptographic requirements for that primitive.", "extended": "By design, some cryptographic primitives (such as block ciphers) require that IVs must have certain properties for the uniqueness and/or unpredictability of an IV. Primitives may vary in how important these properties are.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:If the IV is not properly initialized, the cryptography may be weakened or broken by attacking the IVs themselves. Data that is encrypted can be compromised, and information about the data can be leaked. See [REF-1179].::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Different cipher modes have different requirements for their IVs. When choosing and implementing a mode, it is important to understand those requirements in order to keep security guarantees intact. Generally, it is safest to generate a random IV, since it will be both unpredictable and have a very low chance of being non-unique. IVs do not have to be kept secret, so if generating duplicate IVs is a concern, a list of already-used IVs can be kept and checked against. NIST offers recommendations on generation of IVs for modes of which they have approved. These include options for when random IVs are not practical. For CBC, CFB, and OFB, see [REF-1175]; for GCM, see [REF-1178].::"}
{"id": "CWE-1220", "name": "Insufficient Granularity of Access Control", "description": "The product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. However, implemented access controls lack the required granularity", "extended": "", "consequences": "::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Modify Memory:IMPACT:Read Memory:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:IMPACT:Other:LIKELIHOOD:High:NOTE:A common weakness that can exist in such protection schemes is that access controls or policies are not granular enough, which renders the control policy too broad, because it allows accesses from unauthorized agents to security-sensitive assets. This condition allows agents beyond trusted agents to access assets and could lead to a loss of functionality or the ability to set up the device securely. This further results in security risks from leaked, sensitive, key material to modification of device configuration.::", "mitigations": "::PHASE:Architecture and Design Implementation Testing:DESCRIPTION:Access-control-policy protections must be reviewed for design inconsistency and common weaknesses. Access-control-policy definition and programming flow must be tested in pre-silicon, post-silicon testing.:EFFECTIVENESS:High::"}
{"id": "CWE-1230", "name": "Exposure of Sensitive Information Through Metadata", "description": "The product prevents direct access to a resource containing sensitive information, but it does not sufficiently limit access to metadata that is derived from the original, sensitive information.", "extended": "Developers might correctly prevent unauthorized access to a database or other resource containing sensitive information, but they might not consider that portions of the original information might also be recorded in metadata, search indices, statistical reports, or other resources. If these resources are not also restricted, then attackers might be able to extract some or all of the original information, or otherwise infer some details. For example, an attacker could specify search terms that are known to be unique to a particular person, or view metadata such as activity or creation dates in order to identify usage patterns.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data::", "mitigations": ""}
{"id": "CWE-1235", "name": "Incorrect Use of Autoboxing and Unboxing for Performance Critical Operations", "description": "The code uses boxed primitives, which may introduce inefficiencies into performance-critical operations.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):IMPACT:Reduce Performance:LIKELIHOOD:Low:NOTE:Incorrect autoboxing/unboxing would result in reduced performance, which sometimes can lead to resource consumption issues, impacting availability when used with generic collections.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Use of boxed primitives should be limited to certain situations such as when calling methods with typed parameters. They should not be used for scientific computing or other performance critical operations. They are only suited to support impedance mismatch between reference types and primitives. Examine the use of boxed primitives prior to use. Use SparseArrays or ArrayMap instead of HashMap to avoid performance overhead.::"}
{"id": "CWE-1236", "name": "Improper Neutralization of Formula Elements in a CSV File", "description": "The product saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product.", "extended": "", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Execute Unauthorized Code or Commands:LIKELIHOOD:Low:NOTE:Attackers can populate data fields which, when saved to a CSV file, may attempt information exfiltration or other malicious activity when automatically executed by the spreadsheet software. Note that current versions of Excel warn users of untrusted content.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:When generating CSV output, ensure that formula-sensitive metacharacters are effectively escaped or removed from all data before storage in the resultant CSV. Risky characters include '=' (equal), '+' (plus), '-' (minus), and '@' (at).:EFFECTIVENESS:Moderate::PHASE:Implementation:DESCRIPTION:If a field starts with a formula character, prepend it with a ' (single apostrophe), which prevents Excel from executing the formula.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design:DESCRIPTION:Certain implementations of spreadsheet software might disallow formulas from executing if the file is untrusted, or if the file is not authored by the current user.:EFFECTIVENESS:Limited::"}
{"id": "CWE-1240", "name": "Use of a Cryptographic Primitive with a Risky Implementation", "description": "To fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation.", "extended": "Cryptographic protocols and systems depend on cryptographic primitives (and associated algorithms) as their basic building blocks. Some common examples of primitives are digital signatures, one-way hash functions, ciphers, and public key cryptography; however, the notion of primitive can vary depending on point of view. See Terminology Notes for further explanation of some concepts. Cryptographic primitives are defined to accomplish one very specific task in a precisely defined and mathematically reliable fashion. For example, suppose that for a specific cryptographic primitive (such as an encryption routine), the consensus is that the primitive can only be broken after trying out N different inputs (where the larger the value of N, the stronger the cryptography). For an encryption scheme like AES-256, one would expect N to be so large as to be infeasible to execute in a reasonable amount of time. If a vulnerability is ever found that shows that one can break a cryptographic primitive in significantly less than the expected number of attempts, then that primitive is considered weakened (or sometimes in extreme cases, colloquially it is broken). As a result, anything using this cryptographic primitive would now be considered insecure or risky. Thus, even breaking or weakening a seemingly small cryptographic primitive has the potential to render the whole system vulnerable, due to its reliance on the primitive. A historical example can be found in TLS when using DES. One would colloquially call DES the cryptographic primitive for transport encryption in this version of TLS. In the past, DES was considered strong, because no weaknesses were found in it; importantly, DES has a key length of 56 bits. Trying N=2^56 keys was considered impractical for most actors. Unfortunately, attacking a system with 56-bit keys is now practical via brute force, which makes defeating DES encryption practical. It is now practical for an adversary to read any information sent under this ve", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:High:NOTE:Incorrect usage of crypto primitives could render the supposedly encrypted data as unencrypted plaintext in the worst case.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Require compliance with the strongest-available recommendations from trusted parties, and require that compliance must be kept up-to-date, since recommendations evolve over time. For example, US government systems require FIPS 140-3 certification, which supersedes FIPS 140-2 [REF-1192] [REF-267].:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Ensure that the architecture/design uses the strongest-available primitives and algorithms from trusted parties. For example, US government systems require FIPS 140-3 certification, which supersedes FIPS 140-2 [REF-1192] [REF-267].:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. As with all cryptographic mechanisms, the source code should be available for analysis. If the algorithm may be compromised when attackers find out how it works, then it is especially weak.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design:DESCRIPTION:Try not to use cryptographic algorithms in novel ways or with new modes of operation even when you know it is secure. For example, using SHA-2 chaining to create a 1-time pad for encryption might sound like a good idea, but one should not do this.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design:DESCRIPTION:Ensure that the design can replace one cryptographic primitive "}
{"id": "CWE-1241", "name": "Use of Predictable Algorithm in Random Number Generator", "description": "The device uses an algorithm that is predictable and generates a pseudo-random number.", "extended": "Pseudo-random number generator algorithms are predictable because their registers have a finite number of possible states, which eventually lead to repeating patterns. As a result, pseudo-random number generators (PRNGs) can compromise their randomness or expose their internal state to various attacks, such as reverse engineering or tampering.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:High::", "mitigations": "::PHASE:Architecture and Design Implementation:DESCRIPTION:It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.::"}
{"id": "CWE-1265", "name": "Unintended Reentrant Invocation of Non-reentrant Code Via Nested Calls", "description": "The product invokes code that is believed to be reentrant, but the code performs a call that unintentionally produces a nested invocation of non-reentrant code.", "extended": "In a complex product, a single function call may lead to many different possible code paths, some of which may involve deeply nested calls. It may be difficult to foresee all possible code paths that could emanate from a given function call, even if that call is assumed to be reentrant. In some systems, an external actor can manipulate inputs to the system and thereby achieve a wide range of possible control flows. This is frequently a concern in products that execute scripts from untrusted sources. Examples of such products are web browsers and PDF readers. A weakness is present when one of the possible code paths resulting from a function call alters program state that the original caller assumes to be unchanged during the call.", "consequences": "::SCOPE:Integrity:IMPACT:Unexpected State:LIKELIHOOD:Unknown:NOTE:Exploitation of this weakness can leave the application in an unexpected state and cause variables to be reassigned before the first invocation has completed. This may eventually result in memory corruption or unexpected code execution.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:When architecting a system that will execute untrusted code in response to events, consider executing the untrusted event handlers asynchronously (asynchronous message passing) as opposed to executing them synchronously at the time each event fires. The untrusted code should execute at the start of the next iteration of the thread's message loop. In this way, calls into non-reentrant code are strictly serialized, so that each operation completes fully before the next operation begins. Special attention must be paid to all places where type coercion may result in script execution. Performing all needed coercions at the very beginning of an operation can help reduce the chance of operations executing at unexpected junctures.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Make sure the code (e.g., function or class) in question is reentrant by not leveraging non-local data, not modifying its own code, and not calling other non-reentrant code.:EFFECTIVENESS:High::"}
{"id": "CWE-1284", "name": "Improper Validation of Specified Quantity in Input", "description": "The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.", "extended": "", "consequences": "::SCOPE:Other:SCOPE:Integrity:SCOPE:Availability:IMPACT:Varies by Context:IMPACT:DoS: Resource Consumption (CPU):IMPACT:Modify Memory:IMPACT:Read Memory:NOTE:When the quantity is not properly validated, then attackers can specify malicious quantities to cause excessive resource allocation, trigger unexpected failures, enable buffer overflows, etc.::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1285", "name": "Improper Validation of Specified Index, Position, or Offset in Input", "description": "The product receives input that is expected to specify an index, position, or offset into an indexable resource such as a buffer or file, but it does not validate or incorrectly validates that the specified index/position/offset has the required properties.", "extended": "Often, indexable resources such as memory buffers or files can be accessed using a specific position, index, or offset, such as an index for an array or a position for a file. When untrusted input is not properly validated before it is used as an index, attackers could access (or attempt to access) unauthorized portions of these resources. This could be used to cause buffer overflows, excessive resource allocation, or trigger unexpected failures.", "consequences": "::SCOPE:Other:IMPACT:Varies by Context::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1286", "name": "Improper Validation of Syntactic Correctness of Input", "description": "The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:When untrusted input is not properly validated for the expected syntax, attackers could cause parsing failures, trigger unexpected errors, or expose latent vulnerabilities that might not be directly exploitable if the input had conformed to the syntax.::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1287", "name": "Improper Validation of Specified Type of Input", "description": "The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:When input does not comply with the expected type, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities that would not be possible if the input conformed with the expected type.::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1288", "name": "Improper Validation of Consistency within Input", "description": "The product receives a complex input with multiple elements or fields that must be consistent with each other, but it does not validate or incorrectly validates that the input is actually consistent.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:NOTE:When complex inputs are inconsistent, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities.::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1289", "name": "Improper Validation of Unsafe Equivalence in Input", "description": "The product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value.", "extended": "", "consequences": "::SCOPE:Other:IMPACT:Varies by Context:IMPACT:Bypass Protection Mechanism:NOTE:Attackers can sometimes bypass input validation schemes by finding inputs that appear to be safe, but will be dangerous when processed at a lower layer or by a downstream component. For example, a simple XSS protection mechanism might try to validate that an input has no <script> tags using case-sensitive matching (CWE-178), but since HTML is case-insensitive when processed by web browsers, an attacker could inject <ScrIpT> and trigger XSS (CWE-79).::", "mitigations": "::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.:EFFECTIVENESS:High::"}
{"id": "CWE-1322", "name": "Use of Blocking Code in Single-threaded, Non-blocking Context", "description": "The product uses a non-blocking model that relies on a single threaded process for features such as scalability, but it contains code that can block when it is invoked.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):NOTE:When an attacker can directly invoke the blocking code, or the blocking code can be affected by environmental conditions that can be influenced by an attacker, then this can lead to a denial of service by causing unexpected hang or freeze of the code. An unexpected call to blocking code can trigger an infinite loop, or a large loop that causes the software to pause and wait indefinitely.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Generally speaking, blocking calls should be replaced with non-blocking alternatives that can be used asynchronously. Expensive computations should be passed off to worker threads, although the correct approach depends on the framework being used.::PHASE:Implementation:DESCRIPTION:For expensive computations, consider breaking them up into multiple smaller computations. Refer to the documentation of the framework being used for guidance.::"}
{"id": "CWE-1327", "name": "Binding to an Unrestricted IP Address", "description": "The product assigns the address 0.0.0.0 for a database server, a cloud service/instance, or any computing resource that communicates remotely.", "extended": "", "consequences": "::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:Binding to the address 0.0.0.0 might be much broader access than intended by the developer or administrator, who might only be expecting the server to be reachable from a single interface/network.::SCOPE:Availability:IMPACT:DoS: Amplification:LIKELIHOOD:High::", "mitigations": "::PHASE:System Configuration:DESCRIPTION:Assign IP addresses that are not 0.0.0.0.:EFFECTIVENESS:High::PHASE:System Configuration:STRATEGY:Firewall:DESCRIPTION:Unwanted connections to the configured server may be denied through a firewall or other packet filtering measures.:EFFECTIVENESS:High::"}
{"id": "CWE-1333", "name": "Inefficient Regular Expression Complexity", "description": "The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.", "extended": "", "consequences": "::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):LIKELIHOOD:High:NOTE:Attackers can create crafted inputs that intentionally cause the regular expression to use excessive backtracking in a way that causes the CPU consumption to spike.::", "mitigations": "::PHASE:Architecture and Design:DESCRIPTION:Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.:EFFECTIVENESS:High::PHASE:System Configuration:DESCRIPTION:Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.:EFFECTIVENESS:Moderate::PHASE:Implementation:DESCRIPTION:Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Limit the length of the input that the regular expression will process.:EFFECTIVENESS:Moderate::"}
{"id": "CWE-1335", "name": "Incorrect Bitwise Shift of Integer", "description": "An integer value is specified to be shifted by a negative amount or an amount greater than or equal to the number of bits contained in the value.", "extended": "Specifying a value to be shifted by a negative amount is undefined in various languages. Various computer architectures implement this action in different ways. The compilers and interpreters when generating code to accomplish a shift generally do not do a check for this issue. Specifying an over-shift - a shift greater than or equal to the number of bits contained in a value to be shifted - produces a result that varies by architecture and compiler. In some languages, this action is undefined.", "consequences": "::SCOPE:Integrity:IMPACT:DoS: Crash, Exit, or Restart::SCOPE:Other:IMPACT:Undefined Behavior:IMPACT:Unexpected State:IMPACT:Alter Execution Logic::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Implicitly or explicitly add checks and mitigation for negative or over-shift values.::"}
{"id": "CWE-1339", "name": "Insufficient Precision or Accuracy of a Real Number", "description": "The product processes a real number with an implementation in which the number's representation does not preserve required accuracy and precision in its fractional part, causing an incorrect result.", "extended": "When a security decision or calculation requires highly precise, accurate numbers such as financial calculations or prices, then small variations in the number could be exploited by an attacker. If the fraction can be represented in a fixed number of digits (binary or decimal), there might not be enough digits assigned to represent the number. In other cases, the number cannot be represented in a fixed number of digits due to repeating in decimal or binary notation (e.g. 0.333333...) or due to a transcendental number such as Π or √2. Rounding of numbers can lead to situations where the computer results do not adequately match the result of sufficiently accurate math.", "consequences": "::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:This weakness will generally lead to undefined results and therefore crashes. In some implementations the program will halt if the weakness causes an overflow during a calculation.::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands:NOTE:The results of the math are not as expected. This could cause issues where a value would not be properly calculated and provide an incorrect answer.::SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:This weakness can sometimes trigger buffer overflows which can be used to execute arbitrary code. This is usually outside the scope of a product's implicit security policy.::", "mitigations": "::PHASE:Implementation Patching and Maintenance:DESCRIPTION:The developer or maintainer can move to a more accurate representation of real numbers. In extreme cases, the programmer can move to representations such as ratios of BigInts which can represent real numbers to extremely fine precision. The programmer can also use the concept of an Unum real. The memory and CPU tradeoffs of this change must be examined. Since floating point reals are used in many products and many locations, they are implemented in hardware and most format changes will cause the calculations to be moved into software resulting in slower products.::"}
{"id": "CWE-1341", "name": "Multiple Releases of Same Resource or Handle", "description": "The product attempts to close or release a resource or handle more than once, without any successful open between the close operations.", "extended": "Note that while the implementation for most (if not all) resource reservation allocations involve a unique identifier/pointer/symbolic reference, then if this identifier is reused, checking the identifier for resource closure may result in a false state of openness and closing of the wrong resource. For this reason, reuse of identifiers is discouraged.", "consequences": "::SCOPE:Availability:SCOPE:Integrity:IMPACT:DoS: Crash, Exit, or Restart:LIKELIHOOD:Medium::SCOPE:Integrity:IMPACT:Modify Memory:IMPACT:Modify Application Data:NOTE:Depending on the type of resource and the expected API behavior, this could lead to memory corruption, data corruption, or execution path corruption.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Change the code's logic so that the resource is only closed once. This might require simplifying or refactoring. This fix can be simple to do in small code blocks, but more difficult when multiple closes are buried within complex conditionals.::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:It can be effective to implement a flag that is (1) set when the resource is opened, (2) cleared when it is closed, and (3) checked before closing. This approach can be useful when there are disparate cases in which closes must be performed. However, flag-tracking can increase code complexity and requires diligent compliance by the programmer.::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:When closing a resource, set the resource's associated variable to NULL or equivalent value for the given language. Some APIs will ignore this null value without causing errors. For other APIs, this can lead to application crashes or exceptions, which may still be preferable to corrupting an unintended resource such as memory or data.:EFFECTIVENESS:Defense in Depth::"}
{"id": "CWE-1389", "name": "Incorrect Parsing of Numbers with Different Radices", "description": "The product parses numeric input assuming base 10 (decimal) values, but it does not account for inputs that use a different base number (radix).", "extended": "If the developer assumes decimal-only inputs, the code could produce incorrect numbers when the inputs are parsed using a different base. This can result in unexpected and/or dangerous behavior. For example, a 0127.0.0.1 IP address is parsed as octal due to the leading 0, whose numeric value would be the same as 87.0.0.1 (decimal), where the developer likely expected to use 127.0.0.1. The consequences vary depending on the surrounding code in which this weakness occurs, but they can include bypassing network-based access control using unexpected IP addresses or netmasks, or causing apparently-symbolic identifiers to be processed as if they are numbers. In web applications, this can enable bypassing of SSRF restrictions.", "consequences": "::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:Unknown:NOTE:An attacker may use an unexpected numerical base to access private application resources.::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:IMPACT:Alter Execution Logic:LIKELIHOOD:Unknown:NOTE:An attacker may use an unexpected numerical base to bypass or manipulate access control mechanisms.::", "mitigations": "::PHASE:Implementation:STRATEGY:Enforcement by Conversion:DESCRIPTION:If only decimal-based values are expected in the application, conditional checks should be created in a way that prevent octal or hexadecimal strings from being checked. This can be achieved by converting any numerical string to an explicit base-10 integer prior to the conditional check, to prevent octal or hex values from ever being checked against the condition.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:If various numerical bases do need to be supported, check for leading values indicating the non-decimal base you wish to support (such as 0x for hex) and convert the numeric strings to integers of the respective base. Reject any other alternative-base string that is not intentionally supported by the application.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:If regular expressions are used to validate IP addresses, ensure that they are bounded using ^ and $ to prevent base-prepended IP addresses from being matched.::"}
{"id": "CWE-1392", "name": "Use of Default Credentials", "description": "The product uses default credentials (such as passwords or cryptographic keys) for potentially critical functionality.", "extended": "", "consequences": "::SCOPE:Authentication:IMPACT:Gain Privileges or Assume Identity:NOTE:If admins do not change the defaults, it is easier for attackers to bypass authentication quickly across multiple organizations.::", "mitigations": "::PHASE:Requirements:DESCRIPTION:Prohibit use of default, hard-coded, or other values that do not vary for each installation of the product - especially for separate organizations.:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Force the administrator to change the credential upon installation.:EFFECTIVENESS:High::PHASE:Installation Operation:DESCRIPTION:The product administrator could change the defaults upon installation or during operation.:EFFECTIVENESS:Moderate::"}
{"id": "CWE-1462", "name": "Improper Session Management", "description": "The product does not properly manage user-related sessions such as setting appropriate configurations and settings for sessions on creation and handling sessions throughout their lifetime.", "extended": "", "consequences": "", "mitigations": "::PHASE:Architecture and Design Implementation Operation:DESCRIPTION:Very carefully manage user authenticated sessions. Ensure that appropriate timeouts, invalidation procedures, and protections are established.::"}
{"id": "CWE-1463", "name": "Insufficient Session Timeout Value", "description": "The product establishes an authenticated user session, but it does not properly set a timeout for the session. That is, the timeout is set to an excessively large value or is not set at all.", "extended": "", "consequences": "::SCOPE:Access Control:SCOPE:Integrity:IMPACT:Gain Privileges or Assume Identity:NOTE:This weakness may improve the likely success of certain attacks. For example, an attacker may intercept a session ID, possibly via a network sniffer or Cross-site Scripting attack. Although short session expiration times do not help if a stolen token is immediately used, they will protect against ongoing replaying of the session ID. In another scenario, a user might access a web site from a shared computer (such as at a library, Internet cafe, or open work environment), but forget to close the pages before leaving. A long expiration could allow an attacker to use the browser's back button to access web pages previously accessed by the victim.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that user sessions have appropriate absolute timeouts set. The industry standard is between 4 and 8 hours for an absolute timeout [REF-1540].::PHASE:Implementation:DESCRIPTION:Ensure that user sessions have appropriate inactivity timeouts set. 2 to 5 minutes is recommended for high-value applications, and 15-30 minutes for low-risk applications [REF-1540].::PHASE:Implementation:DESCRIPTION:If using an authentication token for a user session, ensure that the token lifetime is configured based on the recommended best practices from the token provider [REF-1563]. There are situations using authentication tokens such as a JWT (Java Web Token) in which the server-side does not handle session timeouts and trusts the values directly from the token. In this case, it is important that the timeout value is set correctly for the token that is granted.::"}
{"id": "CWE-1464", "name": "Improper Session Invalidation", "description": "The product establishes a session for an authenticated user, but it does not properly invalidate or terminate the session when it is required.", "extended": "", "consequences": "", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that user sessions are invalidated on the server-side for all possible security related events relevant to the application. It is important that the server-side handles all session invalidation and does not rely on the client to remove or delete a session, due to the possibility of adversaries capturing session identifiers or cookies for later reuse.::"}
{"id": "CWE-1465", "name": "Improper Session Invalidation after User Logout", "description": "The product provides a logout functionality or otherwise attempts to end an active session for a user, but it does not properly invalidate the session upon logout.", "extended": "", "consequences": "::SCOPE:Authentication:IMPACT:Gain Privileges or Assume Identity:NOTE:Failure to invalidate a session on log out allows an adversary who has compromised the session more time to take action on the compromised session than is necessary.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that user sessions are invalidated on the server-side after a client logs out or attempts to end their session. It is important that the server-side handles all session invalidation – including multiple tabs or windows, such as within a web browser - and does not rely on the client to remove or delete a session due to the possibility of adversaries capturing session identifiers or cookies for later reuse.::"}
{"id": "CWE-1466", "name": "Improper Session Invalidation after Authentication Credential Change", "description": "The product provides a capability for users to change their authentication credentials, such as username or password, but it does not properly invalidate any current authenticated sessions after this authentication credential change.", "extended": "", "consequences": "::SCOPE:Authentication:IMPACT:Gain Privileges or Assume Identity:NOTE:When a user changes their credentials, such as a password, they expect that the old password can no longer be used. If an adversary had previously logged in with a password that was compromised, they establish a session that was authenticated with that password and it must be invalidated on password change to prevent future compromise of the account.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Ensure that user sessions are invalidated on the server-side after a change to their authentication credentials. It is important that the server-side handles all session invalidation and does not rely on the client to remove or delete a session due to the possibility of adversaries capturing session identifiers or cookies for later reuse.::"}
{"id": "CWE-1467", "name": "Use of Singular Authentication Artifact for Multiple User Sessions", "description": "The product provides an authentication artifact, such as an authentication token, for an authenticated user session, but the same artifact is used for every authenticated user session, potentially across multiple different applications.", "extended": "", "consequences": "::SCOPE:Authentication:IMPACT:Gain Privileges or Assume Identity:NOTE:If an authentication artifact is used across multiple applications or services, it allows an adversary who is able to compromise the authentication artifact to gain access to all applications or services that use that artifact.::SCOPE:Availability:IMPACT:Other:NOTE:In order to revoke access to an adversary who has compromised a shared authentication artifact, that artifact must be invalidated which would affect the availability of any user who has legitimately obtained the artifact to authenticate.::", "mitigations": "::PHASE:Implementation:DESCRIPTION:Enforce re-authentication per user device. This prevents another user from obtaining the singular authentication artifact and making authenticated requests without authenticating.::PHASE:Implementation:DESCRIPTION:Use unique authentication artifacts per user device that will only be accepted if used on that device.::PHASE:Implementation:DESCRIPTION:Ensure that unique authentication artifacts are used for each application or service within an organization to prevent potential reuse across applications.::"}