CWEweakness

CWE-105 Struts: Form Field Without Validator

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Draft
Languages
Java
CWE version
5.0

Description

The product has a form field that is not validated by a corresponding validation form, which can introduce other weaknesses related to insufficient input validation.

Common consequences

• Integrity: Unexpected State — Omitting validation for even a single input field may give attackers the leeway they need to compromise the product. 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. • Integrity: Bypass Protection Mechanism — If unused fields are not validated, shared business logic in an action may allow attackers to bypass the validation checks that are performed for other uses of the form.

Potential mitigations

• [Implementation] Validate all form fields. If a field is unused, it is still important to constrain it so that it is empty or undefined.

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

Related

Child of · CWE (2)

  • CWE-1173 Improper Use of Validation Framework weakness
  • CWE-20 Improper Input Validation weakness