Skip to content
Back to skills

Toctou

ASecurity

Time-of-check to time-of-use testing at the application and file-system layer — stateful windows where a value validated at check time changes before use (re-validation gaps, cached authorization decisions, file/symlink swaps, upload-then-scan gaps, payment confirmation windows). Complements race-condition with the non-HTTP and logic-window cases. Tier 1.

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
securityrusttestingbackend

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill toctou --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Toctou?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Toctou
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-toctou/badge)](https://www.skillsdirectory.com/skills/anandjogawade-toctou)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: toctou
description: Time-of-check to time-of-use testing at the application and file-system layer — stateful windows where a value validated at check time changes before use (re-validation gaps, cached authorization decisions, file/symlink swaps, upload-then-scan gaps, payment confirmation windows). Complements race-condition with the non-HTTP and logic-window cases. Tier 1.
---

# TOCTOU (Time-of-Check / Time-of-Use)

The logic-and-filesystem cousin of race conditions: a check and the dependent use are separated in time, and the state changes between them.

## Trigger phrases
`toctou, time of check time of use, revalidation gap, symlink race, upload scan gap, cached authorization`

## Patterns to test
- **Re-validation gaps:** value checked once, trusted later (price validated at step 1, changed at step 3; permission cached in session after a role change).
- **Upload-then-process:** file passes an AV/type scan, then is swapped/moved before use; or served before scanning completes.
- **File-system (host-side, in authorized local testing):** symlink/path swap between an access check and open/write (classic SUID TOCTOU — overlaps `linux-file-path-abuse`).
- **Payment/confirmation windows:** confirm order before payment settles; change cart between authorization and capture.
- **Token/state windows:** reuse a token in the gap before invalidation.

## Method
Identify the two points (check, use), then change the underlying state in the window — via a second request, a slow upload, or a concurrent edit. Where sub-ms timing is needed, use the single-packet technique (→ `race-condition`).

## Escalation
Bypass validation/authorization, tamper price/state after approval, deliver malicious file past scanning.

## Backend
Use the preferred Kali path (native Kali / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike / Metasploit-MCP) or a headless browser for client-side steps; Windows-local only as last resort. See `zazy-orchestrator`.

## Verification (background, before reporting)
Re-confirm every candidate independently (second account/session, replay, or OAST) before marking CONFIRMED. Report true positives only; hold back anything not reproduced.

## Evidence
The two points, the state change injected in the window, and the resulting bypass.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.