Umbra Wiki weakness weakness/CWE-246
Back to wiki

CWE-246 — J2EE Bad Practices: Direct Use of Sockets

provenance: imported · CWE: CWE-246

CWE-246: J2EE Bad Practices: Direct Use of Sockets

MITRE CWE weakness

Kind Weakness
Abstraction Variant
Status Draft
Likelihood of exploit

Description

The J2EE application directly uses sockets instead of using framework method calls.

The J2EE standard permits the use of sockets only for the purpose of communication with legacy systems when no higher-level protocol is available. Authoring your own communication protocol requires wrestling with difficult security issues. Without significant scrutiny by a security expert, chances are good that a custom communication protocol will suffer from security problems. Many of the same issues apply to a custom implementation of a standard protocol. While there are usually more resources available that address security concerns related to implementing a standard protocol, these resources are also available to attackers.

Common consequences

  • Other: Quality Degradation

Mitigations

Architecture and Design — Use framework method calls instead of using sockets directly.

References

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