Base · Medium

CWE-821: Incorrect Synchronization

The product utilizes a shared resource in a concurrent manner, but it does not correctly synchronize access to the resource.

CWE-821 · Base Level

Description

The product utilizes a shared resource in a concurrent manner, but it does not correctly synchronize access to the resource.

If access to a shared resource is not correctly synchronized, then the resource may not be in a state that is expected by the product. This might lead to unexpected or insecure behaviors, especially if an attacker can influence the shared resource.

Potential Impact

Integrity, Confidentiality, Other

Modify Application Data, Read Application Data, Alter Execution Logic

Detection Methods

  • Automated Static Analysis — Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then sea

Frequently Asked Questions

What is CWE-821?

CWE-821 (Incorrect Synchronization) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product utilizes a shared resource in a concurrent manner, but it does not correctly synchronize access to the resource.

How can CWE-821 be exploited?

Attackers can exploit CWE-821 (Incorrect Synchronization) to modify application data, read application data, alter execution logic. This weakness is typically introduced during the Implementation phase of software development.

How do I prevent CWE-821?

Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.

What is the severity of CWE-821?

CWE-821 is classified as a Base-level weakness (Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.