race-conditions

Validate TOCTOU, double-spend, and quota bypass race conditions on API endpoints.

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/salmanabdurrahman/pi-pentest-agent --skill race-conditions-salmanabdurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: race-conditions
Source: https://github.com/salmanabdurrahman/pi-pentest-agent/tree/main/skills/race-conditions
Command: npx skills add https://github.com/salmanabdurrahman/pi-pentest-agent --skill race-conditions-salmanabdurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the critical need to identify and validate race conditions in web applications without causing service disruption, data corruption, or unauthorized financial transactions.

Core Features & Use Cases

  • Safe Concurrency Testing: Orchestrates controlled, low-parallelism probes to detect TOCTOU and state-inconsistency vulnerabilities.
  • Risk-Gated Execution: Enforces strict authorization, scope validation, and test-fixture isolation to ensure testing remains within authorized boundaries.
  • Use Case: Use this skill to verify if a coupon redemption endpoint correctly handles concurrent requests, ensuring that a single-use code cannot be redeemed multiple times by exploiting the time gap between validation and state updates.

Quick Start

Use the race-conditions skill to perform a controlled concurrency probe on the specified API endpoint using the authorized test account and test-mode fixtures.

Frequently Asked Questions about race-conditions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for race conditions in API endpoints safely?

Testing for TOCTOU vulnerabilities involves identifying state-mutating API endpoints where atomic operations are required, then validating if concurrent requests can exploit the time gap between validation and state updates to bypass business logic invariants.

How do I prevent double-spend or quota bypasses during concurrency testing?

Race condition testing applies to state-mutating API endpoints where atomic operations maintain business logic invariants, such as verifying if a coupon redemption endpoint correctly handles concurrent requests to prevent single-use code exploitation.

What is the best way to validate TOCTOU vulnerabilities without disrupting production?

Limitations of concurrency testing include the strict requirement for pre-defined authorization gates, adherence to rate limits, and test-fixture isolation to prevent unauthorized financial transactions, data corruption, or service disruption.

Can I test concurrency flaws on coupon redemption endpoints using authorized test accounts?

Concurrency probes complement broader API security testing and pentest workflows by isolating state-inconsistency vulnerabilities like double-spends, ensuring overall endpoint integrity within authorized security testing scopes.