---
title: "CWE-106: Struts: Plug-in Framework not in Use"
url: https://radicalnotion.ai/cwe/cwe-106
type: cwe
description: "When an application does not use an input validation framework such as the Struts Validator, there is a greater risk of introducing weaknesses related to insufficient input validation."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-106: Struts: Plug-in Framework not in Use

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

## Description

When an application does not use an input validation framework such as the Struts Validator, there is a greater risk of introducing weaknesses related to insufficient input validation.

Unchecked input is the leading cause of vulnerabilities in J2EE applications. Unchecked input leads to cross-site scripting, process control, and SQL injection vulnerabilities, among others.

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.

## Modes of introduction

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

## Applicable platforms

**Languages:** Java (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Unexpected State | - |

## Potential mitigations

### Architecture and Design (Input Validation)

Use an input validation framework such as Struts.

### Architecture and Design (Libraries or Frameworks)

Use an input validation framework such as Struts.

### Implementation (Input Validation)

Use the Struts Validator to validate all program input before it is processed by the application. Ensure that there are no holes in the configuration of the Struts Validator. Example uses of the validator include checking to ensure that:

- Phone number fields contain only valid characters in phone numbers
- Boolean values are only "T" or "F"
- Free-form strings are of a reasonable length and composition

### Implementation (Libraries or Frameworks)

Use the Struts Validator to validate all program input before it is processed by the application. Ensure that there are no holes in the configuration of the Struts Validator. Example uses of the validator include checking to ensure that:

- Phone number fields contain only valid characters in phone numbers
- Boolean values are only "T" or "F"
- Free-form strings are of a reasonable length and composition

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

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, through the Struts framework, the RegistrationForm bean will maintain the user data.

Bad code:

```java
public class RegistrationForm extends org.apache.struts.action.ActionForm {

    // private variables for registration form
    private String name;
    private String email;
    ...

    public RegistrationForm() {
        super();
    }

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

Good code:

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

    // private variables for registration form
    private String name;
    private String email;
    ...

    public RegistrationForm() {
        super();
    }

    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {...}

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

Good code:

```xml
<struts-config>

    <form-beans>
        <form-bean name="RegistrationForm" type="RegistrationForm"/>
    </form-beans>

    ...

    <!-- ========================= Validator plugin ================================= -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property
            property="pathnames"
            value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>

</struts-config>
```

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-20](https://radicalnotion.ai/cwe/cwe-20) | Improper Input Validation |
| Parent | [CWE-1173](https://radicalnotion.ai/cwe/cwe-1173) | Improper Use of Validation Framework |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Struts: Plug-in Framework Not In Use | - | - |

## Frequently asked questions

### What is CWE-106?

When an application does not use an input validation framework such as the Struts Validator, there is a greater risk of introducing weaknesses related to insufficient input validation.

### How do you prevent CWE-106?

Use an input validation framework such as Struts.

### How is CWE-106 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-106?

Exploiting CWE-106 can lead to: Unexpected State.

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

---

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