CWE-567: Unsynchronized Access to Shared Data in a Multithreaded Context
The product does not properly synchronize shared data, such as static variables across threads, which can lead to undefined behavior and unpredictable data changes.
Last updated
Overview
Within servlets, shared static variables are not protected from concurrent access, but servlets are multithreaded. This is a typical programming mistake in J2EE applications, since the multithreading is handled by the framework. When a shared variable can be influenced by an attacker, one thread could wind up modifying the variable to contain data that is not valid for a different thread that is also using the data within the variable. Note that this weakness is not unique to servlets.
Real-world CVEs
4 recorded CVEs are caused by CWE-567 (Unsynchronized Access to Shared Data in a Multithreaded Context). The highest-severity and most recent are shown first. 1 new CWE-567 CVE has been recorded so far in 2026 (1 in 2025).
- CVE-2023-44374High · CVSS 7.1 · EPSS 48th2023-11-14
- CVE-2025-48908Medium · CVSS 6.7 · EPSS 0th2025-06-06
- CVE-2020-25724Medium · CVSS 4.3 · EPSS 46th2021-05-26
- CVE-2026-46693
ImageMagick: Race Condition in distributed pixel cache server can result in file descriptor hijacking
Medium · CVSS 4.1 · EPSS 0th2026-06-10
Common consequences
What can happen when CWE-567 is exploited.
Read Application Data, Modify Application Data, DoS: Instability, DoS: Crash, Exit, or Restart
Affects: Confidentiality, Integrity, Availability
If the shared variable contains sensitive data, it may be manipulated or displayed in another user session. If this data is used to control the application, its value can be manipulated to cause the application to crash or perform poorly.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
How to prevent it
Practical mitigations for CWE-567, grouped by where in the lifecycle they apply.
Remove the use of static variables used between servlets. If this cannot be avoided, use synchronized access for these variables.
How to detect it
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 searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
The following code implements a basic counter for how many times the page has been accesed.
Vulnerable example
public static class Counter extends HttpServlet {Terminology & mappings
Mapped taxonomies
- The CERT Oracle Secure Coding Standard for Java (2011): Ensure visibility when accessing shared primitive variables (VNA00-J)
- The CERT Oracle Secure Coding Standard for Java (2011): Ensure that compound operations on shared variables are atomic (VNA02-J)
- Software Fault Patterns: Missing Lock (SFP19)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-567.
- What is CWE-567?
- The product does not properly synchronize shared data, such as static variables across threads, which can lead to undefined behavior and unpredictable data changes.
- What CVEs are caused by CWE-567?
- 4 recorded CVEs are attributed to CWE-567, including CVE-2023-44374, CVE-2025-48908, CVE-2020-25724.
- How do you prevent CWE-567?
- Remove the use of static variables used between servlets. If this cannot be avoided, use synchronized access for these variables.
- How is CWE-567 detected?
- 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 searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-567?
- Exploiting CWE-567 can lead to: Read Application Data, Modify Application Data, DoS: Instability, DoS: Crash, Exit, or Restart.
- Is CWE-567 actively exploited?
- 4 recorded CVEs are caused by CWE-567; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-567) (opens in a new tab)
- CWE-567 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-567
Get alerted the moment a new CWE-567 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.