CWEweakness

CWE-103 Struts: Incomplete validate() Method Definition

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Draft
Languages
Java
CWE version
5.0

Description

The product has a validator form that either does not define a validate() method, or defines a validate() method but does not call super.validate().

Common consequences

• Other: Unexpected State, Varies by Context — If the code does not call super.validate(), the Validation Framework cannot check the contents of the form against a validation form. In other words, the validation framework will be disabled for the given form. Disabling the validation framework for a form exposes the product to numerous types of attacks. • Confidentiality, Integrity, Availability, Other: Other — Although J2EE applications are not generally susceptible to memory corruption attacks, if a J2EE application interfaces with native code that does not perform array bounds checking, an attacker may be able to use an input validation mistake in the J2EE application to launch a buffer overflow attack.

Potential mitigations

• [Implementation] Implement the validate() method and call super.validate() within that method.

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 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.)

Related

Child of · CWE (2)

  • CWE-20 Improper Input Validation weakness
  • CWE-573 Improper Following of Specification by Caller weakness

Referenced by OWASP · mapped cwe (1)