Umbra Wiki weakness weakness/CWE-383
Back to wiki

CWE-383 — J2EE Bad Practices: Direct Use of Threads

provenance: imported · CWE: CWE-383

CWE-383: J2EE Bad Practices: Direct Use of Threads

MITRE CWE weakness

Kind Weakness
Abstraction Variant
Status Draft
Likelihood of exploit

Description

Thread management in a Web application is forbidden in some circumstances and is always highly error prone.

Thread management in a web application is forbidden by the J2EE standard in some circumstances and is always highly error prone. Managing threads is difficult and is likely to interfere in unpredictable ways with the behavior of the application container. Even without interfering with the container, thread management usually leads to bugs that are hard to detect and diagnose like deadlock, race conditions, and other synchronization errors.

Common consequences

  • Other: Quality Degradation

Mitigations

Architecture and Design — For EJB, use framework approaches for parallel execution, instead of using threads.

References

  • CWE page: https://cwe.mitre.org/data/definitions/383.html
  • CWE list: https://cwe.mitre.org/data/index.html