---
title: "CAPEC-128: Integer Attacks"
url: https://radicalnotion.ai/capec/capec-128
type: capec
description: "An attacker takes advantage of the structure of integer variables to cause these variables to assume values that are not expected by an application. For example, adding one to the largest positive integer in a signed integer variable results in a negative number. Negative numbers may be illegal in an application and the application may prevent an attacker from providing them directly, but the application may not consider that adding two positive numbers can create a negative number do to the structure of integer storage formats."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-128: Integer Attacks

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** Medium
- **CAPEC catalog version:** 3.9

## Description

An attacker takes advantage of the structure of integer variables to cause these variables to assume values that are not expected by an application. For example, adding one to the largest positive integer in a signed integer variable results in a negative number. Negative numbers may be illegal in an application and the application may prevent an attacker from providing them directly, but the application may not consider that adding two positive numbers can create a negative number do to the structure of integer storage formats.

## Prerequisites

- The target application must have an integer variable for which only some of the possible integer values are expected by the application and where there are no checks on the value of the variable before use.
- The attacker must be able to manipulate the targeted integer variable such that normal operations result in non-standard values due to the storage structure of integers.

## Resources required

- None: No specialized resources are required to execute this type of attack.

## Related weaknesses (CWE)

- [CWE-682](https://radicalnotion.ai/cwe/cwe-682): Incorrect Calculation

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-153](https://radicalnotion.ai/capec/capec-153) | Input Data Manipulation |
| Child | [CAPEC-92](https://radicalnotion.ai/capec/capec-92) | Forced Integer Overflow |

## Frequently asked questions

### What is CAPEC-128?

An attacker takes advantage of the structure of integer variables to cause these variables to assume values that are not expected by an application. For example, adding one to the largest positive integer in a signed integer variable results in a negative number. Negative numbers may be illegal in an application and the application may prevent an attacker from providing them directly, but the application may not consider that adding two positive numbers can create a negative number do to the structure of integer storage formats.

### What weaknesses does CAPEC-128 target?

CAPEC-128 exploits one CWE weakness: CWE-682 (Incorrect Calculation).

### How severe is CAPEC-128?

MITRE rates CAPEC-128 as Medium severity.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/128.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-128). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
