Validation fields that do not appear in forms they are associated with indicate that the validation logic is out of date.

It is easy for developers to forget to update validation logic when they make changes to an ActionForm class. One indication that validation logic is not being properly maintained is inconsistencies between the action form and the validation form.
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.

Primary

Implementation

Operation

Other
Other
It is critically important that validation logic be maintained and kept in sync with the rest of the application. Unchecked input is the root cause of some of today's worst and most common software security problems. Cross-site scripting, SQL injection, and process control vulnerabilities all stem from incomplete or absent input validation.

Automated Static Analysis
To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.
Moderate

Manual Static Analysis
To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.
Moderate

This example shows an inconsistency between an action form and a validation form. with a third field.
This first block of code shows an action form that has two fields, startDate and endDate.

public class DateRangeForm extends ValidatorForm {
String startDate, endDate;
public void setStartDate(String startDate) {this.startDate = startDate;}
public void setEndDate(String endDate) {this.endDate = endDate;}
}

This second block of related code shows a validation form with a third field: scale. The presence of the third field suggests that DateRangeForm was modified without taking validation into account.

<form name="DateRangeForm"><field property="startDate" depends="date"><arg0 key="start.date"/></field><field property="endDate" depends="date"><arg0 key="end.date"/></field><field property="scale" depends="integer"><arg0 key="range.scale"/></field></form>

Struts: Validator Without Form Field

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.

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-11-24
updated Common_Consequences, Description, Other_Notes

CWE Content Team
MITRE
2009-07-27
updated Demonstrative_Examples

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Relationships

CWE Content Team
MITRE
2013-02-21
updated Potential_Mitigations

CWE Content Team
MITRE
2014-06-23
updated Description, Other_Notes

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

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

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

CWE Content Team
MITRE
2022-04-28
updated Relationships

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes