CWE-102: Struts: Duplicate Validation Forms

VariantIncomplete

The product uses multiple validation forms with the same name, which might cause the Struts Validator to validate a form that the programmer does not expect.

View on MITRE
Back to CWE Lookup

Extended Description

If two validation forms have the same name, the Struts Validator arbitrarily chooses one of the forms to use for input validation and discards the other. This decision might not correspond to the programmer's expectations, possibly leading to resultant weaknesses. Moreover, it indicates that the validation logic is not up-to-date, and can indicate that other, more subtle validation errors are present.

Technical Details

Structure
Simple

Applicable To

Languages
Java
Platforms

Frequently Asked Questions

What is CWE-102: Struts: Duplicate Validation Forms?+

CWE-102: Struts: Duplicate Validation Forms is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product uses multiple validation forms with the same name, which might cause the Struts Validator to validate a form that the programmer does not expect. If two validation forms have the same name, the Struts Validator arbitrarily chooses one of the forms to use for input validation and discards the other. This decision might not correspond to the programmer's expectations, possibly leading to resultant weaknesses. Moreover, it indicates that the validation logic is not up-to-date, and can indicate that other, more subtle validation errors are present.

What are the security consequences of Struts: Duplicate Validation Forms?+

If exploited, CWE-102 (Struts: Duplicate Validation Forms) it can compromise Integrity, leading to outcomes such as Unexpected State.

How do you prevent or mitigate Struts: Duplicate Validation Forms?+

Recommended mitigations for CWE-102 include: The DTD or schema validation will not catch the duplicate occurrence of the same form name. To find the issue in the implementation, manual checks or automated static analysis could be applied to the xml configuration files.

Which programming languages are affected by Struts: Duplicate Validation Forms?+

CWE-102 commonly affects Java. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-102 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More