Detects arbitrary write vulnerabilities by identifying unchecked array indexing and out-of-bounds memory writes. Use when analyzing memory write operations, pointer arithmetic, or investigating code execution vulnerabilities.
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: detecting-arbitrary-write
description: Detects arbitrary write vulnerabilities by identifying unchecked array indexing and out-of-bounds memory writes. Use when analyzing memory write operations, pointer arithmetic, or investigating code execution vulnerabilities.
---
# Arbitrary Write Detection
## Detection Workflow
1. **Identify write operations**: Find all array writes, pointer dereference writes, format string usage with %n, struct member writes
2. **Trace input sources**: Use `xrefs_to` to trace input, follow user data to write points, identify attacker-controlled values
3. **Check bounds validation**: Verify array bounds checks, assess pointer arithmetic safety, check format string validation, review type safety
4. **Assess exploitability**: Can attacker control write address? Can attacker control write value? What can be overwritten? Can code execution be achieved?
## Key Patterns
- Unchecked array indexing: array writes with user-controlled indices, pointer arithmetic writes with user input
- Format string writes: user-controlled format strings with %n, memory writes via printf
- Pointer dereference writes: writing through user-controlled pointers, use-after-free writes, vtable corruption
- Struct/class member writes: writing to wrong struct members, type confusion, vtable/function pointer overwrites
## Output Format
Report with: id, type, subtype, severity, confidence, location, vulnerability, write operation, array base, index source, value source, bounds check, exploitable, attack scenario, potential targets, mitigation.
## Severity Guidelines
- **CRITICAL**: Arbitrary write enabling code execution
- **HIGH**: Arbitrary write with significant impact
- **MEDIUM**: Arbitrary write with limited impact
- **LOW**: Minor arbitrary write issues
## See Also
- `patterns.md` - Detailed detection patterns and exploitation scenarios
- `examples.md` - Example analysis cases and code samples
- `references.md` - CWE references and mitigation strategiesNo comments yet. Be the first to comment!
Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.
Generate a comprehensive VC investment assessment report for a company
Manage Globalize translation resources using the CLI. Use this skill when the user asks to create a translation project, add or remove languages, connect a GitHub or GitLab repository, manage glossaries or style guides, invite team members, manage API keys, or perform any Globalize platform operation. Also use when the user mentions managing translations, translation workflow, or wants to "set up translations for this repo." This skill assumes the CLI is already installed and authenticated — ...
Develop and operate a local Paperclip instance — start and stop servers, pull updates from master, run builds and tests, manage worktrees, back up databases, and diagnose problems. Use whenever you need to work on the Paperclip codebase itself or keep a running instance healthy.
Guide for creating, updating, and deprecating hybrid cloud RPC services in Sentry. Use when asked to "add RPC method", "create RPC service", "hybrid cloud service", "new RPC model", "deprecate RPC method", "remove RPC endpoint", "cross-silo service", "cell RPC", or "control silo service". Covers service scaffolding, method signatures, RPC models, cell resolvers, testing, and safe deprecation workflows.