CWEweakness
CWE-688 Function Call With Incorrect Variable or Reference as Argument
- Abstraction
- Variant
- Structure
- Simple
- Status
- Draft
- Languages
- C, Perl
- CWE version
- 5.0
Description
The product calls a function, procedure, or routine, but the caller specifies the wrong variable or reference as one of the arguments, which may lead to undefined behavior and resultant weaknesses.
Common consequences
• Other: Quality Degradation
Potential mitigations
• [Testing] Because this function call often produces incorrect behavior it will usually be detected during testing or normal operation of the product. During testing exercise all possible control paths will typically expose this weakness except in rare cases when the incorrect function call accidentally produces the correct results or if the provided argument type is very similar to the expected argument type.
Detection methods
• Other: 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 of arguments, such as format strings in C. It also can occur in loosely typed languages or environments. This might require an understanding of intended program behavior or design to determine whether the value is incorrect.
Observed examples
• CVE-2005-2548: Kernel code specifies the wrong variable in first argument, leading to resultant NULL pointer dereference.
Related
Observed example · CVE (1)
- CVE-2005-2548 vlan_dev.c in the VLAN code for Linux kernel 2.6.8 allows remote attackers to cause a denial of service (kernel oops from null dereference)… vulnerability
Child of · CWE (1)
- CWE-628 Function Call with Incorrectly Specified Arguments weakness
Referenced by CVE · weakness (5)
- CVE-2026-101959 A Function Call With Incorrect Variable or Reference as Argument vulnerability in the routing protocol daemon (rpd) of Juniper Networks… vulnerability
- CVE-2026-76878 In OpenStack Aodh before 22.0.1, the alarm list API bypasses project scoping when the all_projects query parameter is set to false. vulnerability
- CVE-2026-12311 Information disclosure, sandbox escape in the Security: Process Sandboxing component. vulnerability
- CVE-2026-33549 SPIP 4.4.10 through 4.4.12 before 4.4.13 allows unintended privilege assignment (of administrator privileges) during the editing of an… vulnerability
- CVE-2021-33713 A vulnerability has been identified in JT Utilities (All versions < V13.0.2.0). vulnerability