LiveActive security incident?Get immediate response
CWE Reference

CWE-687: Function Call With Incorrectly Specified… | Glexia

CWE-687 (Function Call With Incorrectly Specified Argument Value) weakness overview with consequences, detection methods, mitigations, related CVEs and MITRE…

Release 4.20weaknessDraft

Glexia's Take · Automated analysis

CWE-687: Function Call With Incorrectly Specified Argument Value

Function Call With Incorrectly Specified Argument Value represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

Executive Impact

  • Other: Quality Degradation

Developer Pattern

CWE-687 is the kind of defect developers can usually prevent with explicit validation, safer framework defaults, and tests that exercise hostile input or unsafe state transitions.

Automation confidence

high confidence from CWE-687, 4.20.

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Official CWE Definition

CWE-687: Function Call With Incorrectly Specified Argument Value

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.

Type
weakness
Abstraction
Variant
Status
Draft
Source
MITRE CWE definition

Developer And Remediation Guidance

How teams prevent and detect this weakness

Causes

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

Remediation

  • Use safe APIs
  • Centralize the control
  • Add regression tests
  • Review logs and telemetry for attempted abuse

Detection

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

Mappings

Related CVEs, CWEs, and ATT&CK context

Related CWEs

Related CVEs

Related CVE mappings appear after CVE records are cross-indexed.

Open CWE CVE mapping

ATT&CK Relevance

ATT&CK relevance is shown only when reviewed or responsibly inferred.