detecting-arbitrary-read

Detects arbitrary read vulnerabilities by identifying unchecked array indexing and out-of-bounds memory access. Use when analyzing array access patterns, pointer arithmetic, or investigating information disclosure vulnerabilities.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill automates the detection of arbitrary read vulnerabilities by identifying unchecked array indexing and out-of-bounds memory access. It streamlines security auditing by tracing user-controlled data to sensitive read points, helping developers and security researchers prevent information disclosure and memory safety exploits through automated pattern matching and exploitability assessment.

Use Cases

  • Security Auditing: Automatically scan C/C++ or low-level codebases to identify potential memory safety vulnerabilities and information disclosure risks.
  • Exploitability Assessment: Trace user-controlled inputs to read operations to determine if an attacker can bypass ASLR or leak sensitive credentials like keys and passwords.
  • Code Hardening: Review complex array access patterns and pointer arithmetic to ensure proper bounds validation and mitigate arbitrary read vectors before deployment.
  • Vulnerability Investigation: Analyze specific functions or memory operations during incident response to understand the root cause of data leaks and implement effective mitigations.
namedetecting-arbitrary-read
descriptionDetects arbitrary read vulnerabilities by identifying unchecked array indexing and out-of-bounds memory access. Use when analyzing array access patterns, pointer arithmetic, or investigating information disclosure vulnerabilities.

Arbitrary Read Detection

Detection Workflow

  1. Identify read operations: Array accesses, pointer dereferences, format strings, struct member access
  2. Trace input sources: Use xrefs_to to trace user-controlled data to read points
  3. Check bounds validation: Verify array bounds, pointer arithmetic safety, format string validation
  4. Assess exploitability: Can attacker control read address? What information can be disclosed?

Key Patterns

  • Unchecked array indexing with user-controlled indices
  • Format string vulnerabilities with %s, %x
  • Dereferencing user-controlled pointers
  • Wrong struct member access via type confusion

Output Format

Report with: id, type, severity, confidence, location (function, address, line), read operation, index source, bounds check status, exploitability, attack scenario, potential disclosure, mitigation.

Severity Guidelines

  • CRITICAL: Arbitrary read of sensitive data (keys, passwords)
  • HIGH: Arbitrary read enabling ASLR bypass
  • MEDIUM: Arbitrary read with limited disclosure
  • LOW: Minor information disclosure

See Also

  • patterns.md - Detailed detection patterns and exploitation scenarios
  • examples.md - Example analysis cases and code samples
  • references.md - CWE references and tool documentation