Non-atomic single-use token (nonce) check: a replayed value is rejected with a SELECT (`->count()` / `->exists()`), but the token itself is only INSERTed later through a separate write. Concurrent requests replaying the same SAML assertion all run the SELECT before any sibling request commits its INSERT, so every request passes the guard and mints an authent
Rule Explorer
Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.
- Public rules
- 6965
- Downloads
- 12.9M
- Verified
- 6965
- Authors
- 2
$UPDATE() overwrites the stored entity wholesale under the shared write lock without ever checking that the currently stored entity is not in a terminal (final) state. Terminal states must be immutable: with this blind write-back, a stale or racing caller (e.g. a cancel flow whose own earlier non-terminal check is raced by a completion or a second cancel) ca
An attacker-influenceable filesystem path reaches sqlite3.connect() by name. SQLite opens and, with creation semantics, creates whatever the final path component points to at each connect, so a local attacker who can create names in the database directory can plant a symbolic link (redirecting database creation and locking, or splitting mutual exclusion betw
$OPEN opens $PATH in write mode ($FLAGS) resolved purely by name and then the descriptor is written, but the open is not anchored to a vetted directory fd (no dir_fd=), is not non-blocking (no O_NONBLOCK, so a planted named pipe stalls the open forever), and the enclosing function never re-checks the descriptor's kernel identity with os.fstat (S_ISREG / st_d
This code moves a path aside with os.rename/Path.rename and later restores it by name with os.link without follow_symlinks=False. The original pathname stands empty between the rename-aside and the restore, so a local user with write access to the directory can create their own file at the emptied name (breaking mutual exclusion) or swap a symbolic link in a
pluggy's eager loader load_setuptools_entrypoints() imports every module registered in the entry-point group, executing arbitrary import-time code, and only afterwards is the trusted-namespace allowlist (a startswith() prefix check on the already-imported plugin modules, e.g. plugin_module.__name__.startswith("docling.")) applied. This check-after-use orderi
Check-then-act SSRF: $URL is validated by $CHECK(...) but then fetched with an unpinned requests.* call. The validator only inspects the hostname at validation time; requests re-resolves DNS when connecting, so an attacker-controlled name can rebind to an internal address after the check (CWE-367), and any 3xx hop issued by the target is never re-validated (
$URL is checked by $VALIDATOR(...) and then passed to requests.$M(...). The validator resolves the hostname itself, but requests performs a second, independent DNS resolution when the connection is opened and is never pinned to the address that was validated. An attacker who controls DNS for the URL host can answer the first lookup with a public IP and the s
TOCTOU race in $FUNC: a $MODEL row is guarded only by a plain, non-atomic existence read ($MODEL.objects.first()/exists()), but the corresponding $MODEL.objects.create() runs outside any transaction.atomic() block and without a select_for_update() row lock. Two concurrent requests can both pass the guard and both create the row, breaking the at-most-one inva
Privileged filesystem mutation (write/chmod/chown/chgrp) on a path derived from a customer-controlled home directory without a containment re-check guarding the flow. The path string is validated only at derivation time; PHP re-resolves the path and follows symlinks when the operation executes, so a local user who controls the home directory can swap in a sy
Classpath entry is checked with ScriptApproval.using(entry) and its URL is loaded directly without localizing remote content to a local temporary file first. An attacker controlling the remote URL can return benign code during verification and malicious code when loaded by the ClassLoader (TOCTOU). Download remote classpath entries locally and verify using S
An outbound forced mirror push / LFS upload uses a remote address resolved from the stored git remote configuration without re-validating it against the migrations allow/block lists. The lists are only enforced when the mirror (or migration) is created, so a hostname that was allowed at creation time may later resolve to a blocked or internal address: on eve
Pathname-based permission or ownership operations (chmod, chown, lchown) on FTS traversal entries (fts_path or fts_accpath) are vulnerable to TOCTOU symlink races. An attacker with write access to the traversed directory can replace the entry with a symlink before chmod/chown runs, leading to unauthorized modification of arbitrary files. Instead, open the fi
Direct use of `open_tree()` may follow symlinks in leading path components, leading to TOCTOU and symlink redirection vulnerabilities. Consider pinning the path using `openat2()` with `RESOLVE_NO_SYMLINKS` before mounting or cloning trees.
MCP stdio process spawn checks authority on disk but spawns Command with raw path arguments without preparing bound, verified launch handles, introducing a TOCTOU race.
Check-then-insert race (TOCTOU/CWE-367): the availability/exclusivity guard is called with only a data object (no transaction handle) and outside any $DB.transaction(...) callback, while the same function performs the dependent insert on an autocommit connection. The guard's plain SELECT holds no row lock (no SELECT ... FOR UPDATE), so concurrent requests ca
A path coming from request input or read back from a stored cache entry is deleted with a raw host-level OS call (os.Remove/os.RemoveAll/syscall.Unlink/unix.Unlink). This delete bypasses the application's scoped/validating filesystem abstraction and any delete-permission check, and the kernel re-resolves every ancestor component at unlink time, so a symlink
Performing separate metadata lookups during recursive directory iteration may introduce TOCTOU race conditions.
Non-atomic credit/refund minting (TOCTOU race): a model-instance financial balance is incremented by abs($AMOUNT) (or a negated amount) without wrapping the guard check ("no pending record"), the record persist, and this increment in a single DB::beginTransaction()/DB::commit() unit, and without re-fetching the guarded rows with lockForUpdate(). Concurrent d
Using 'kSecGuestAttributePid' to query code signatures via SecCodeCopyGuestWithAttributes is vulnerable to PID reuse and exec race conditions. Use 'kSecGuestAttributeAudit' with an audit_token_t instead.
File operation relies on incomplete daemon/chroot state checks rather than checking active relative path confinement or using race-free directory file descriptor operations. This can expose path resolution to TOCTOU symlink races.
A networked data chunk is fetched in a loop and hashed directly without prior validation or confirmation. This can lead to a Time-of-Check to Time-of-Use (TOCTOU) vulnerability where the user confirms an initial data subset but a malicious host provides different subsequent chunks during the hashing phase.
Non-atomic check-then-act on the bootstrap/first-user path: $CMD.$CHECK(...) only reads whether initial setup already finished, and the privileged account is then written by a separate, unconditional $CMD.$WRITE(...) call with no transaction, lock, or atomic verify-and-create guard. Concurrent unauthenticated requests can all pass the check before any insert
Applying `setxattr` on string paths inside a loop (often part of directory traversal or deferred attribute application) introduces a Time-of-Check to Time-of-Use (TOCTOU) race condition. If an attacker replaces a traversed directory with a symlink before the attribute application, `setxattr` will follow the symlink, allowing modifications on unintended arbit