CWE-683: Function Call With Incorrect Order of Arguments

Export to Word

Description

The product calls a function, procedure, or routine, but the caller specifies the arguments in an incorrect order, leading to resultant weaknesses.

Extended Description

While this weakness might be caught by the compiler in some languages, it can occur more frequently in cases in which the called function accepts variable numbers or types of arguments, such as format strings in C. It also can occur in languages or environments that do not enforce strong typing.


ThreatScore

Threat Mapped score: 1.8

Industry: Finiancial

Threat priority: P4 - Informational (Low)


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
Implementation This problem typically occurs when the programmer makes a typo, or copy and paste errors.

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: 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']);

Notes

← Back to CWE list