Integer Overflow Error

ID

integer_overflow_error

Severity

high

Kind

Injection

CWE

190

Description

An integer overflow condition exists when an integer used in a compiled program extends beyond the range limits and has not been properly checked from the input stream.

Rationale

Integer overflow vulnerabilities allow attackers to trigger unexpected program behavior by providing input values that exceed maximum integer limits, causing the value to wrap around to negative or small positive numbers. This can bypass security checks, corrupt memory allocations leading to buffer overflows, cause logic errors in financial calculations, or trigger denial of service through crashes. Attackers exploit these conditions to gain unauthorized access, execute arbitrary code, or manipulate application state in security-critical operations.

Remediation

In order to prevent overflows and divide by 0 (zero) errors in the application, please rewrite the backend program, checking if the values of integers being processed are within the application’s allowed range. This will require a recompilation of the backend executable.