# Out-of-bounds memory write

A native component writes beyond an allocated object because length, index, or allocation assumptions do not agree.

**Candidate CWE:** [CWE-787](https://cwe.mitre.org/data/definitions/787.html)

## Test hypothesis

Use an instrumented local harness with documented API ownership and realistic input. Minimize the failing bytes and trace the input-derived value into allocation and write. Retest the public consumer and a fixed build; demonstrate memory corruption without turning the PoC into a code-execution payload.

## Evidence required

ASan write trace, allocation extent, triggering values, source location, build flags, minimized input, and normal-input control. State exploitation constraints instead of equating every write overflow with RCE.

## Rule out false positives

The caller violates a required buffer-size contract, the harness underallocates its own output buffer, or the fault belongs to unsupported test-only code.

## Playbook and command references

- [Libraries and parsers: bounded fuzzing to a minimal reproducer](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/parser-fuzzing.html) — Build a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.
- [Source review: entry point to protected operation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/source-dataflow.html) — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Libraries%20and%20parsers%3A%20bounded%20fuzzing%20to%20a%20minimal%20reproducer)

## Referenced by these target playbooks

[OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [Network services](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/network.html) · [Hardware & firmware](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/hardware.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

- [T1203 · Exploitation for Client Execution](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html#T1203) — **Only if:** A client-application vulnerability executes attacker-controlled code when the client processes a file, document, or other content; identify the affected desktop/client process. **Not established by:** A parser crash alone is insufficient. Ordinary web XSS is not automatically a native client execution exploit, and Mobile uses separate technique IDs.
- [T1068 · Exploitation for Privilege Escalation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html#T1068) — **Only if:** A software vulnerability crosses a privilege boundary into a more privileged process or security context; record before/after identities and the vulnerable component. **Not established by:** Do not infer this from any feature named admin, a writable path alone, or a kernel version match. Application role authorization flaws need their own contextual analysis.

## Primary references

- [MITRE CWE-787](https://cwe.mitre.org/data/definitions/787.html)
- [Clang AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
