Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-688 (使用不正确变量或索引作为参数的函数调用) — Vulnerability Class 2

2 vulnerabilities classified as CWE-688 (使用不正确变量或索引作为参数的函数调用). AI Chinese analysis included.

CWE-688 represents a logic error where a function invocation utilizes an incorrect variable or reference as an argument, leading to undefined behavior and potential system instability. This weakness typically arises from developer oversight, such as passing a pointer to an uninitialized variable or misidentifying the intended data source during routine calls. Exploitation often results in data corruption, unexpected application crashes, or the leakage of sensitive information if the wrong memory address is accessed. To prevent this vulnerability, developers must rigorously validate argument types and ensure that variables are properly initialized before being passed to functions. Implementing static analysis tools and conducting thorough code reviews can help identify mismatched references early in the development lifecycle, thereby reducing the risk of introducing these subtle but dangerous logic flaws into production software.

MITRE CWE 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 (1)
OtherQuality Degradation
Mitigations (1)
TestingBecause 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 typ…
Examples (1)
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 ... }
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2026-33549 SPIP 安全漏洞 — SPIP 6.7 Medium2026-03-22
CVE-2021-33713 Siemens JT Utilities 安全漏洞 — JT Utilities 5.5 -2021-07-13

Vulnerabilities classified as CWE-688 (使用不正确变量或索引作为参数的函数调用) represent 2 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.