---
title: "CAPEC-123: Buffer Manipulation"
url: https://radicalnotion.ai/capec/capec-123
type: capec
description: "An adversary manipulates an application's interaction with a buffer in an attempt to read or modify data they shouldn't have access to. Buffer attacks are distinguished in that it is the buffer space itself that is the target of the attack rather than any code responsible for interpreting the content of the buffer. In virtually all buffer attacks the content that is placed in the buffer is immaterial. Instead, most buffer attacks involve retrieving or providing more input than can be stored in the allocated buffer, resulting in the reading or overwriting of other unintended program memory."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-123: Buffer Manipulation

- **Abstraction:** Meta
- **Status:** Draft
- **Typical severity:** Very High
- **Likelihood of attack:** High
- **CAPEC catalog version:** 3.9

## Description

An adversary manipulates an application's interaction with a buffer in an attempt to read or modify data they shouldn't have access to. Buffer attacks are distinguished in that it is the buffer space itself that is the target of the attack rather than any code responsible for interpreting the content of the buffer. In virtually all buffer attacks the content that is placed in the buffer is immaterial. Instead, most buffer attacks involve retrieving or providing more input than can be stored in the allocated buffer, resulting in the reading or overwriting of other unintended program memory.

## Prerequisites

- The adversary must identify a programmatic means for interacting with a buffer, such as vulnerable C code, and be able to provide input to this interaction.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Availability | Unreliable Execution | A buffer manipulation attack often results in a crash of the application due to the corruption of memory. |
| Confidentiality | Execute Unauthorized Commands, Modify Data, Read Data | If constructed properly, a buffer manipulation attack can be used to contol the execution of the application leading to any number of negative consequenses. |

## Mitigations

- To help protect an application from buffer manipulation attacks, a number of potential mitigations can be leveraged. Before starting the development of the application, consider using a code language (e.g., Java) or compiler that limits the ability of developers to act beyond the bounds of a buffer. If the chosen language is susceptible to buffer related issues (e.g., C) then consider using secure functions instead of those vulnerable to buffer manipulations. If a potentially dangerous function must be used, make sure that proper boundary checking is performed. Additionally, there are often a number of compiler-based mechanisms (e.g., StackGuard, ProPolice and the Microsoft Visual Studio /GS flag) that can help identify and protect against potential buffer issues. Finally, there may be operating system level preventative functionality that can be applied.

## Related weaknesses (CWE)

- [CWE-119](https://radicalnotion.ai/cwe/cwe-119): Improper Restriction of Operations within the Bounds of a Memory Buffer

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Child | [CAPEC-100](https://radicalnotion.ai/capec/capec-100) | Overflow Buffers |
| Child | [CAPEC-540](https://radicalnotion.ai/capec/capec-540) | Overread Buffers |

## Frequently asked questions

### What is CAPEC-123?

An adversary manipulates an application's interaction with a buffer in an attempt to read or modify data they shouldn't have access to. Buffer attacks are distinguished in that it is the buffer space itself that is the target of the attack rather than any code responsible for interpreting the content of the buffer. In virtually all buffer attacks the content that is placed in the buffer is immaterial. Instead, most buffer attacks involve retrieving or providing more input than can be stored in the allocated buffer, resulting in the reading or overwriting of other unintended program memory.

### How do you prevent CAPEC-123?

To help protect an application from buffer manipulation attacks, a number of potential mitigations can be leveraged. Before starting the development of the application, consider using a code language (e.g., Java) or compiler that limits the ability of developers to act beyond the bounds of a buffer. If the chosen language is susceptible to buffer related issues (e.g., C) then consider using secure functions instead of those vulnerable to buffer manipulations. If a potentially dangerous function must be used, make sure that proper boundary checking is performed. Additionally, there are often a number of compiler-based mechanisms (e.g., StackGuard, ProPolice and the Microsoft Visual Studio /GS flag) that can help identify and protect against potential buffer issues. Finally, there may be operating system level preventative functionality that can be applied.

### What weaknesses does CAPEC-123 target?

CAPEC-123 exploits one CWE weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer).

### How severe is CAPEC-123?

MITRE rates CAPEC-123 as Very High severity with high likelihood of attack.

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

---

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