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:

the wrong variable or reference;
an incorrect number of arguments;
incorrect order of arguments;
wrong type of arguments; or
wrong value.

Primary
This is usually primary to other weaknesses, but it can be resultant if the function's API or function prototype changes.

Implementation

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.

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.

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.

The following PHP method authenticates a user given a username/password combination but is called with the parameters in reverse order.

function authenticate($username, $password) {

// authenticate user
...
}
authenticate($_POST['password'], $_POST['username']);

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.

sub ReportAuth {my ($username, $result, $fatal) = @_;PrintLog("auth: username=%s, result=%d", $username, $result);if (($result ne "success") && $fatal) {die "Failed!\n";}}
sub PrivilegedFunc{my $result = CheckAuth($username);ReportAuth($username, $result, 0);DoReallyImportantStuff();}

In the following Java snippet, the accessGranted() method is accidentally called with the static ADMIN_ROLES array rather than the user roles.

private static final String[] ADMIN_ROLES = ...;public boolean void accessGranted(String resource, String user) {String[] userRoles = getUserRoles(user);return accessGranted(resource, ADMIN_ROLES);}
private boolean void accessGranted(String resource, String[] userRoles) {

// grant or deny access based on user roles
...
}

CVE-2006-7049
The method calls the functions with the wrong argument order, which allows remote attackers to bypass intended access restrictions.
https://www.cve.org/CVERecord?id=CVE-2006-7049

DCL10-C
Maintain the contract between the writer and caller of variadic functions

EXP37-C
Call functions with the correct number and type of arguments
CWE More Abstract

DCL00-PL
Do not use subroutine prototypes
CWE More Abstract

EXP33-PL
Do not invoke a function in a context for which it is not defined
Imprecise

Allowed
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.
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.

CWE Content Team
MITRE
2007-05-07
Draft 6
2007-05-07

CWE Content Team
MITRE
2008-09-08
updated Description, Relationships, Other_Notes, Weakness_Ordinalities

CWE Content Team
MITRE
2008-11-24
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2009-10-29
updated Detection_Factors, Other_Notes, Weakness_Ordinalities

CWE Content Team
MITRE
2010-02-16
updated Detection_Factors

CWE Content Team
MITRE
2010-06-21
updated Description

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2011-06-27
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Common_Consequences, Demonstrative_Examples, Relationships

CWE Content Team
MITRE
2012-10-30
updated Potential_Mitigations

CWE Content Team
MITRE
2014-07-30
updated Relationships

CWE Content Team
MITRE
2017-11-08
updated Applicable_Platforms, Taxonomy_Mappings

CWE Content Team
MITRE
2019-01-03
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2020-02-24
updated Relationships

CWE Content Team
MITRE
2021-03-15
updated Detection_Factors, Relationships

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Relationships

Incorrectly Specified Arguments