CWE
Home > CWE List > CWE-103 Individual Dictionary Definition (Draft 9)   View the CWE List

CWE-103 Individual Dictionary Definition (Draft 9)

Struts: Incomplete validate() Method Definition
Weakness ID
Status: Draft

103 (Weakness Variant)

Description

Summary

The application has a validator form that either fails to define a validate() method, or defines a validate() method but fails to call super.validate(). This could introduce other weaknesses related to missing input validation.

Weakness Ordinality

Primary (Weakness exists independent of other weaknesses)

Causal Nature

Explicit (This is an explicit weakness resulting from behavior of the developer)

Context Notes

The Struts Validator uses a form's validate() method to check the contents of the form properties against the constraints specified in the associated validation form. That means the following classes have a validate() method that is part of the validation framework: ValidatorForm, ValidatorActionForm, DynaValidatorForm, and DynaValidatorActionForm. If you create a class that extends one of these classes, and if your class implements custom validation logic by overriding the validate() method, you must call super.validate() in your validate() implementation. If you do not, 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 application to numerous types of attacks. Unchecked input is the root cause of vulnerabilities like cross-site scripting, process control, and SQL injection. 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.

Relationships
NatureTypeIDName
ChildOfWeakness ClassWeakness ClassWeakness Class101Struts Validation Problems
Source Taxonomies

7 Pernicious Kingdoms - Struts: Erroneous validate() Method

Applicable Platforms

Java

Page Last Updated: April 21, 2008