CWE-662: Improper Synchronization
The product utilizes multiple threads, processes, components, or systems to allow temporary access to a shared resource that can only be exclusive to one process at a time, but it does not properly synchronize these actions, which might cause simultaneous accesses of this resource by multiple threads or processes.
Synchronization refers to a variety of behaviors and mechanisms that allow two or more independently-operating processes or threads to ensure that they operate on shared resources in predictable ways that do not interfere with each other. Some shared resource operations cannot be executed atomically; that is, multiple steps must be guaranteed to execute sequentially, without any interference by other processes. Synchronization mechanisms vary widely, but they may include locking, mutexes, and semaphores. When a multi-step operation on a shared resource cannot be guaranteed to execute independent of interference, then the resulting behavior can be unpredictable. Improper synchronization could lead to data or memory corruption, denial of service, etc.
Consequences
- Integrity, Confidentiality, Other: Modify Application Data, Read Application Data, Alter Execution Logic
How to prevent it
- Implementation: Use industry standard APIs to synchronize your code.
Recent advisories
- GHSA-qj83-cq47-w5f8 — Axios HTTP/2 Session Cleanup State Corruption Vulnerability
- GHSA-45m3-398w-m2m9 — OliveTin has unauthenticated DoS via concurrent map writes in OAuth2 state handling
- GHSA-h33q-mhmp-8p67 — Vyper has a double eval in For List Iter
- GHSA-x2w4-c67p-g44j — Grafana Missing Synchronization vulnerability
- GHSA-h67m-xg8f-fxcf — Deadlock in mutually recursive `tf.function` objects
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor