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

Primary

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 the code creates a class that extends one of these classes, and if that class implements custom validation logic by overriding the validate() method, the code must call super.validate() in the validate() implementation.

Implementation

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.

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

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

In the following Java example the class RegistrationForm is a Struts framework ActionForm Bean that will maintain user input data from a registration webpage for an online business site. The user will enter registration data and the RegistrationForm bean in the Struts framework will maintain the user data. Tthe RegistrationForm class implements the validate method to validate the user input entered into the form.

public class RegistrationForm extends org.apache.struts.validator.ValidatorForm {
// private variables for registration formprivate String name;private String email;...
public RegistrationForm() {super();}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {ActionErrors errors = new ActionErrors();if (getName() == null || getName().length() < 1) {errors.add("name", new ActionMessage("error.name.required"));}return errors;}

// getter and setter methods for private variables...
}

Although the validate method is implemented in this example the method does not call the validate method of the ValidatorForm parent class with a call super.validate(). Without the call to the parent validator class only the custom validation will be performed and the default validation will not be performed. The following example shows that the validate method of the ValidatorForm class is called within the implementation of the validate method.

public class RegistrationForm extends org.apache.struts.validator.ValidatorForm {

// private variables for registration formprivate String name;private String email;...
public RegistrationForm() {super();}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {ActionErrors errors = super.validate(mapping, request);if (errors == null) {errors = new ActionErrors();}

if (getName() == null || getName().length() < 1) {errors.add("name", new ActionMessage("error.name.required"));}return errors;
}
// getter and setter methods for private variables...}

Struts: Erroneous validate() Method

SFP24
Tainted input to command

Allowed
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

This could introduce other weaknesses related to missing input validation.
The current description implies a loose composite of two separate weaknesses, so this node might need to be split or converted into a low-level category.

7 Pernicious Kingdoms
2006-07-19
Draft 3
2006-07-19

Eric Dalci
Cigital
2008-07-01
updated Potential_Mitigations, Time_of_Introduction

CWE Content Team
MITRE
2008-09-08
updated Relationships, Other_Notes, Taxonomy_Mappings, Weakness_Ordinalities

CWE Content Team
MITRE
2008-10-14
updated Description, Maintenance_Notes

CWE Content Team
MITRE
2008-11-24
updated Background_Details, Common_Consequences, Description, Other_Notes, Relationship_Notes

CWE Content Team
MITRE
2009-03-10
updated Relationships

CWE Content Team
MITRE
2009-12-28
updated Common_Consequences, Other_Notes

CWE Content Team
MITRE
2010-06-21
updated Demonstrative_Examples

CWE Content Team
MITRE
2010-12-13
updated Description

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Relationships

CWE Content Team
MITRE
2012-10-30
updated Potential_Mitigations

CWE Content Team
MITRE
2014-07-30
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2017-11-08
updated Causal_Nature, Relationships

CWE Content Team
MITRE
2020-02-24
updated References, Relationships

CWE Content Team
MITRE
2021-07-20
updated Background_Details, Description

CWE Content Team
MITRE
2023-01-31
updated Common_Consequences, Description

CWE Content Team
MITRE
2023-04-27
updated Detection_Factors, Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Common_Consequences, Description, Relationships