---
title: "CWE-102: Struts: Duplicate Validation Forms"
url: https://radicalnotion.ai/cwe/cwe-102
type: cwe
description: "The product uses multiple Struts validation forms with the same name."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-102: Struts: Duplicate Validation Forms

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 1
- **Of those, in CISA KEV:** 0
- **New in 2026:** 0
- **CWE catalog version:** 4.21

## Description

The product uses multiple Struts validation forms with the same name.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** Java (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Unexpected State | 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. |

## Potential mitigations

### Implementation

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.

## Detection methods

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

## Demonstrative examples

### Example 1

These two Struts validation forms have the same name.

Bad code:

```xml
<form-validation>
    <formset>
        <form name="ProjectForm"> ... </form>
        <form name="ProjectForm"> ... </form>
    </formset>
</form-validation>
```

It is not certain which form will be used by Struts. It is critically important that validation logic be maintained and kept in sync with the rest of the product.

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2022-20520 | - | high | 7.8 | - | No | 2022-12-16 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-20](https://radicalnotion.ai/cwe/cwe-20) | Improper Input Validation |
| Parent | [CWE-694](https://radicalnotion.ai/cwe/cwe-694) | Use of Multiple Resources with Duplicate Identifier |
| Parent | [CWE-1173](https://radicalnotion.ai/cwe/cwe-1173) | Improper Use of Validation Framework |
| Peer | [CWE-675](https://radicalnotion.ai/cwe/cwe-675) | Multiple Operations on Resource in Single-Operation Context |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Struts: Duplicate Validation Forms | - | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |

## Frequently asked questions

### What is CWE-102?

The product uses multiple Struts validation forms with the same name.

### What CVEs are caused by CWE-102?

1 recorded CVE is attributed to CWE-102: CVE-2022-20520.

### How do you prevent CWE-102?

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.

### How is CWE-102 detected?

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

### What are the consequences of CWE-102?

Exploiting CWE-102 can lead to: Unexpected State.

### Is CWE-102 actively exploited?

1 recorded CVE is caused by CWE-102; it is not currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/102.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-102). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
