There are multiple ways in which this weakness can be introduced, including:
| Impact | Details |
|---|---|
|
Quality Degradation; Gain Privileges or Assume Identity |
Scope: Other, Access Control
This weakness can cause unintended behavior and can lead to additional weaknesses such as allowing an attacker to gain unintended access to system resources.
|
| Phase(s) | Mitigation |
|---|---|
|
Build and Compilation |
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.
|
|
Architecture and Design |
Make sure your API's are stable before you use them in production code.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 573 | Improper Following of Specification by Caller |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 683 | Function Call With Incorrect Order of Arguments |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 685 | Function Call With Incorrect Number of Arguments |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 686 | Function Call With Incorrect Argument Type |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 687 | Function Call With Incorrectly Specified Argument Value |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 688 | Function Call With Incorrect Variable or Reference as Argument |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1006 | Bad Coding Practices |
| Phase | Note |
|---|---|
| Implementation |
Class: Not Language-Specific (Undetermined Prevalence)
Example 1
The following PHP method authenticates a user given a username/password combination but is called with the parameters in reverse order.
Example 2
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.
Example 3
In the following Java snippet, the accessGranted() method is accidentally called with the static ADMIN_ROLES array rather than the user roles.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
The method calls the functions with the wrong argument order, which allows remote attackers to bypass intended access restrictions.
|
| Ordinality | Description |
|---|---|
|
Primary
|
(where the weakness exists independent of other weaknesses)
This is usually primary to other weaknesses, but it can be resultant if the function's API or function prototype changes.
|
| Method | Details |
|---|---|
|
Other |
Since these bugs typically introduce incorrect behavior that is obvious to users, they are found quickly, unless they occur in rarely-tested code paths. Managing the correct number of arguments can be made more difficult in cases where format strings are used, or when variable numbers of arguments are supported.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 736 | CERT C Secure Coding Standard (2008) Chapter 3 - Declarations and Initialization (DCL) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 737 | CERT C Secure Coding Standard (2008) Chapter 4 - Expressions (EXP) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 742 | CERT C Secure Coding Standard (2008) Chapter 9 - Memory Management (MEM) |
| MemberOf | ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 884 | CWE Cross-section |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 998 | SFP Secondary Cluster: Glitch in Computation |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1157 | SEI CERT C Coding Standard - Guidelines 03. Expressions (EXP) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1180 | SEI CERT Perl Coding Standard - Guidelines 02. Declarations and Initialization (DCL) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1181 | SEI CERT Perl Coding Standard - Guidelines 03. Expressions (EXP) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1412 | Comprehensive Categorization: Poor Coding Practices |
Rationale
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.Comments
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.| Mapped Taxonomy Name | Node 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 |
| Submissions | |||
|---|---|---|---|
| Submission Date | Submitter | Organization | |
|
2007年05月07日
(CWE Draft 6, 2007年05月07日) |
CWE Content Team | MITRE | |
| Modifications | |||
| Modification Date | Modifier | Organization | |
| 2023年06月29日 | CWE Content Team | MITRE | |
| updated Mapping_Notes | |||
| 2023年04月27日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2021年03月15日 | CWE Content Team | MITRE | |
| updated Detection_Factors, Relationships | |||
| 2020年02月24日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2019年01月03日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2017年11月08日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Taxonomy_Mappings | |||
| 2014年07月30日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2012年10月30日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2012年05月11日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Demonstrative_Examples, Relationships | |||
| 2011年06月27日 | CWE Content Team | MITRE | |
| updated Common_Consequences | |||
| 2011年06月01日 | CWE Content Team | MITRE | |
| updated Common_Consequences | |||
| 2010年06月21日 | CWE Content Team | MITRE | |
| updated Description | |||
| 2010年02月16日 | CWE Content Team | MITRE | |
| updated Detection_Factors | |||
| 2009年10月29日 | CWE Content Team | MITRE | |
| updated Detection_Factors, Other_Notes, Weakness_Ordinalities | |||
| 2008年11月24日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2008年09月08日 | CWE Content Team | MITRE | |
| updated Description, Relationships, Other_Notes, Weakness_Ordinalities | |||
| Previous Entry Names | |||
| Change Date | Previous Entry Name | ||
| 2008年04月11日 | Incorrectly Specified Arguments | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.