目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1000

100.0%

CWE-480 使用操作符不正确 类漏洞列表 3

CWE-480 使用操作符不正确 类弱点 3 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-480 属于逻辑错误类漏洞,指程序因拼写失误或疏忽,错误使用了运算符,从而在安全关键逻辑中改变程序行为。攻击者通常利用此缺陷绕过身份验证或权限检查,通过构造特定输入触发非预期的代码路径,进而获取未授权访问或执行恶意操作。开发者应避免此类问题,需严格遵循编码规范,启用静态代码分析工具进行自动检测,并在关键逻辑处实施严格的代码审查与单元测试,确保运算符使用的准确性。

MITRE CWE 官方描述
CWE:CWE-480 使用了错误的运算符 (Use of Incorrect Operator) 英文:产品意外地使用了错误的运算符,从而以与安全相关的方式改变了逻辑。 这类错误通常是程序员输入错误 (typo) 的结果。
常见影响 (1)
OtherAlter Execution Logic
This weakness can cause unintended logic to be executed and other unexpected application behavior.
代码示例 (2)
The following C/C++ and C# examples attempt to validate an int input parameter against the integer value 100.
int isValid(int value) { if (value=100) { printf("Value is valid\n"); return(1); } printf("Value is not valid\n"); return(0); }
Bad · C
bool isValid(int value) { if (value=100) { Console.WriteLine("Value is valid."); return true; } Console.WriteLine("Value is not valid."); return false; }
Bad · C#
The following C/C++ example shows a simple implementation of a stack that includes methods for adding and removing integer values from the stack. The example uses pointers to add and remove integer values to the stack array variable.
#define SIZE 50 int *tos, *p1, stack[SIZE]; void push(int i) { p1++; if(p1==(tos+SIZE)) { // Print stack overflow error message and exit } *p1 == i; } int pop(void) { if(p1==tos) { // Print stack underflow error message and exit } p1--; return *(p1+1); } int main(int argc, char *argv[]) { // initialize tos and p1 to point to the top of stack tos = stack; p1 = stack; // code to add and remove items from stack ... return 0; }
Bad · C
CVE ID标题CVSS风险等级Published
CVE-2026-4748 FreeBSD 安全漏洞 — FreeBSD 5.3AIMediumAI2026-04-01
CVE-2025-52985 Juniper Networks Junos OS Evolved 安全漏洞 — Junos OS Evolved 5.3 Medium2025-07-11
CVE-2022-1947 Chris Brame Trudesk 安全漏洞 — polonel/trudesk 6.5 -2022-05-31

CWE-480(使用操作符不正确) 是常见的弱点类别,本平台收录该类弱点关联的 3 条 CVE 漏洞。