CWE-1284 类弱点 151 条 CVE 漏洞汇总,含 AI 中文分析。
CWE-1284属于输入验证缺陷,指程序未正确校验输入中指定的数量属性。攻击者常通过提交异常数值(如极大长度或频率)触发资源耗尽、计算错误或逻辑越界,导致服务拒绝或系统崩溃。开发者应实施严格的边界检查,确保输入数量符合预期范围,并在分配资源或控制循环前进行有效性验证,从而防止因非法数量引发的安全风险。
... public static final double price = 20.00; int quantity = currentUser.getAttribute("quantity"); double total = price * quantity; chargeUser(total); ...... #define MAX_DIM 100 ... /* board dimensions */ int m,n, error; board_square_t *board; printf("Please specify the board height: \n"); error = scanf("%d", &m); if ( EOF == error ){ die("No integer passed: Die evil hacker!\n"); } printf("Please specify the board width: \n"); error = scanf("%d", &n); if ( EOF == error ){ die("No integer passed: Die evil hacker!\n"); } if ( m > MAX_DIM || n > MAX_DIM ) { die("Value too large: Die evil hacker!\n"); } board = (board_square_t*) malloc( m * n * sizeof(board_square_t)); ...CWE-1284 是常见的弱点类别,本平台收录该类弱点关联的 151 条 CVE 漏洞。