结构: Simple
Abstraction: Base
状态: Draft
被利用可能性: unkown
The product calls a function, procedure, or routine with arguments that are not correctly specified, leading to always-incorrect behavior and resultant weaknesses.
There are multiple ways in which this weakness can be introduced, including:
Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
['Other', 'Access Control'] | ['Quality Degradation', 'Gain Privileges or Assume Identity'] | This weakness can cause unintended behavior and can lead to additional weaknesses such as allowing an attacker to gain unintended access to system resources. |
策略:
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.
策略:
Make sure your API's are stable before you use them in production code.
The following PHP method authenticates a user given a username/password combination but is called with the parameters in reverse order.
bad PHP
This Perl code intends to record whether a user authenticated successfully or not, and to exit if the user fails to authenticate. However, when it calls ReportAuth(), the third argument is specified as 0 instead of 1, so it does not exit.
bad Perl
In the following Java snippet, the accessGranted() method is accidentally called with the static ADMIN_ROLES array rather than the user roles.
bad Java
标识 | 说明 | 链接 |
---|---|---|
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
CERT C Secure Coding | DCL10-C | Maintain the contract between the writer and caller of variadic functions | |
CERT C Secure Coding | EXP37-C | CWE More Abstract | Call functions with the correct number and type of arguments |
SEI CERT Perl Coding Standard | DCL00-PL | CWE More Abstract | Do not use subroutine prototypes |
SEI CERT Perl Coding Standard | EXP33-PL | Imprecise | Do not invoke a function in a context for which it is not defined |