The `strtok()` function is non-reentrant and intrinsically thread-unsafe due to its use of a shared static buffer to store state. In multi-threaded contexts such as PAM modules, using `strtok()` can cause race conditions, leading to corrupted token parsing and unauthorized or denied accesses. Furthermore, `strtok()` mutates strings in-place; directly passing
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
- 2917
- Downloads
- 3.2M
- Verified
- 2917
- Authors
- 2
Dynamically invoking `setCurrentContext()` with a variable modifies the Kubernetes client configuration state. In concurrent server environments, modifying shared client objects during a request creates a Context Confusion race condition, where simultaneous requests can execute operations against the wrong cluster context. Instantiate isolated client configu
Dynamically modifying the Kubernetes configuration context via `setCurrentContext` on an existing client object creates a critical race condition in concurrent environments (Context Confusion). During concurrent execution, commands designated for one cluster might inadvertently execute on whichever cluster context was set last globally. Pass per-execution co
Time-of-Check-Time-of-Use (TOCTOU) race condition detected during first user registration. Checking the active user count before insertion can allow multiple concurrent requests to evaluate as the "first user" and be granted administrative rights. Insert the newly registered user with a default standard role first, then evaluate the user count strictly post-
prctl(PR_SET_DUMPABLE, 1, ...) is called unconditionally without a boolean guard. In privilege-separated (setuid) architectures where the calling process still holds a privileged IPC channel to a root parent, an attacker sharing the same UID can ptrace-attach to this now-dumpable process and inject arbitrary privileged operations through that channel. Add a
Concurrent modification of a receiver's map or fields in an HTTP handler without synchronization is unsafe. In Go, concurrent map writes cause a fatal runtime panic (fatal error: concurrent map writes), leading to process termination and Denial of Service (DoS). Protect shared state with a synchronization primitive like `sync.Mutex` or `sync.RWMutex`.
Directly mutating properties (e.g., `Timeout`, `Transport`, `CheckRedirect`) of a shared `http.Client` structure (such as via a method receiver field) without synchronization can cause a race condition. This cross-request state contamination might result in leaking credentials or routing behavior to concurrent requests. Instead of mutating a shared `http.Cli
An HTTP handler or middleware method modifies its pointer receiver struct fields. Because handlers are often shared as singletons across concurrent requests, mutating handler state without synchronization can cause severe concurrency vulnerabilities (like race conditions leaking tokens across concurrent users). State specific to a request should be stored wi
The `blk_discard` array used for processing UNMAP requests is accessed from a shared structure rather than a per-request structure. This creates a race condition during concurrent UNMAP commands, leading to data corruption and DoS. Move this state into a per-request structure such as `SRB_EXTENSION`.
Performing non-transactional database mutations (such as update or delete) inside a pre-deletion event listener (e.g., `*Deleting`) can lead to race conditions and persistent data inconsistencies. If the parent deletion aborts or fails, the side effects applied by this listener cannot be rolled back, causing orphaned records. Move this cleanup logic to a pos
Frame progress is reported before side data is fully exported, creating a data race condition where other threads may read incomplete or corrupted frame side data. Ensure `ff_progress_frame_report` is called only after all frame data, including side data, has been attached.
Appending directly to a slice parameter might modify its underlying array in-place if capacity > length. In a concurrent context, this causes data races and memory corruption (e.g., cryptographic keys). Allocate a new slice using `make`, then copy or append the parameter's contents into it.
Usage of the `chmod` function call hints at a potential Time Of Check Time Of Use (TOCTOU) vulnerability. An attacker may be able to modify the file being specified by the `chmod` function prior to the `chmod` function being called. Since `chmod` will resolve symbolic links, an attacker may be able to exploit this fact to have files outside of their control
Usage of the `access` function call hints at a potential Time Of Check Time Of Use (TOCTOU) vulnerability. Using the `access` function to check if a file exists and is readable before opening it, an attacker can create a race condition between the `access` call and opening the file. The attacker could replace the file with a different one or modify its conte
Usage of the `chown` function call hints at a potential Time Of Check Time Of Use (TOCTOU) vulnerability. An attacker may be able to modify the file being specified by the `chmod` function prior to the `chown` function being called. Since `chown` will resolve symbolic links, an attacker may be able to exploit this fact to have files outside of their control
The `vfork` function is suffers from portability issues and is not recommended. In some Linux systems `vfork` is vulnerable to a race condition while the child process is running as the user's UID but hasn't executed `execve`. The user may be able to send signals to this process, which in `vfork` would not be sent to the parent process. As a result a user ma
Usage of the `open` family of functions may hint at a potential Time Of Check Time Of Use (TOCTOU) vulnerability. An attacker may be able to modify the file being specified by the `open` function prior to the `open` function being called. Prior to calling `open`, use `lstat` to open the file and confirm the attributes are correct. Then use `open` to get a fi