---
title: "CWE-687: Function Call With Incorrectly Specified Argument Value"
url: https://radicalnotion.ai/cwe/cwe-687
type: cwe
description: "The product calls a function, procedure, or routine, but the caller specifies an argument that contains the wrong value, which may lead to resultant weaknesses."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-687: Function Call With Incorrectly Specified Argument Value

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 2
- **Of those, in CISA KEV:** 0
- **New in 2026:** 0
- **CWE catalog version:** 4.21

## Description

The product calls a function, procedure, or routine, but the caller specifies an argument that contains the wrong value, which may lead to resultant weaknesses.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Quality Degradation | - |

## Detection methods

### Manual Static Analysis

This might require an understanding of intended program behavior or design to determine whether the value is incorrect.

## Demonstrative examples

### Example 1

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 code:

```perl
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();
}
```

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-36985 | Remote Code Execution (RCE) through an external lookup due to “copybuckets.py“ script in the “splunk\_archiver“ application in Splunk Enterprise | high | 8.8 | - | No | 2024-07-01 |
| CVE-2024-49603 | - | medium | 6.5 | - | No | 2024-12-09 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-628](https://radicalnotion.ai/cwe/cwe-628) | Function Call with Incorrectly Specified Arguments |
| Child | [CWE-560](https://radicalnotion.ai/cwe/cwe-560) | Use of umask() with chmod-style Argument |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CERT C Secure Coding | Do not perform zero length allocations | MEM04-C | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |

## Frequently asked questions

### What is CWE-687?

The product calls a function, procedure, or routine, but the caller specifies an argument that contains the wrong value, which may lead to resultant weaknesses.

### What CVEs are caused by CWE-687?

2 recorded CVEs are attributed to CWE-687, including CVE-2024-36985 and CVE-2024-49603.

### How is CWE-687 detected?

Manual Static Analysis: This might require an understanding of intended program behavior or design to determine whether the value is incorrect.

### What are the consequences of CWE-687?

Exploiting CWE-687 can lead to: Quality Degradation.

### Is CWE-687 actively exploited?

2 recorded CVEs are caused by CWE-687; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/687.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-687). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
