CWE-110: Struts: Validator Without Form Field
View customized information:
For users who are interested in more notional aspects of a weakness. Example: educators, technical writers, and project/program managers.
For users who are concerned with the practical application and details about the nature of a weakness and how to prevent it from happening. Example: tool developers, security researchers, pen-testers, incident response analysts.
For users who are mapping an issue to CWE/CAPEC IDs, i.e., finding the most appropriate CWE for a specific issue (e.g., a CVE record). Example: tool developers, security researchers.
For users who wish to see all available information for the CWE/CAPEC entry.
For users who want to customize what details are displayed.
×
Edit Custom FilterValidation 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. ![]()
![]() ![]()
![]()
![]()
![]()
Example 1 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. (bad code)
Example Language: Java
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. (bad code)
Example Language: XML
<form name="DateRangeForm">
<field property="startDate" depends="date"> </form><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>
![]()
More information is available — Please edit the custom filter or select a different filter. |
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation. |