CWE-110 Variante Brouillon

Struts: Validator Without Form Field

This vulnerability occurs when a Struts application's validation configuration file references form fields that no longer exist in the corresponding ActionForm class. This mismatch indicates…

Définition

What is CWE-110?

This vulnerability occurs when a Struts application's validation configuration file references form fields that no longer exist in the corresponding ActionForm class. This mismatch indicates outdated validation logic that can fail to properly check user input.
This issue commonly arises during maintenance. When a developer modifies an ActionForm by renaming or removing a field but forgets to update the associated validation rules (validator.xml), the validation logic becomes desynchronized. The system may then ignore validation for new or modified fields, potentially allowing malicious or malformed data to pass through. While Java applications themselves are not typically vulnerable to classic buffer overflows, this validation gap becomes critical if the application passes data to native code components (like C/C++ libraries). An attacker could exploit the missing validation to inject unexpected data, potentially triggering a buffer overflow in the native layer and compromising the system.
Impact réel

Real-world CVEs caused by CWE-110

Aucune référence CVE publique n'est liée à ce CWE dans le catalogue MITRE pour le moment.

Comment les attaquants l'exploitent

Parcours de l'attaquant étape par étape

  1. 1

    This example shows an inconsistency between an action form and a validation form. with a third field.

  2. 2

    This first block of code shows an action form that has two fields, startDate and endDate.

  3. 3

    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.

Exemple de code vulnérable

Vulnerable Java

This first block of code shows an action form that has two fields, startDate and endDate.

Vulnérable 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;
  		}
  }
Exemple de code sécurisé

Secure pseudo

Sécurisé pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Liste de contrôle de prévention

How to prevent CWE-110

  • Architecture Use safe-by-default frameworks and APIs that prevent the unsafe pattern from being expressible.
  • Implementation Validate input at trust boundaries; use allowlists, not denylists.
  • Implementation Apply the principle of least privilege to credentials, file paths, and runtime permissions.
  • Testing Cover this weakness in CI: SAST rules + targeted unit tests for the data flow.
  • Operation Monitor logs for the runtime signals listed in the next section.
Signaux de détection

How to detect CWE-110

Automated Static Analysis Moderate

To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.

Manual Static Analysis Moderate

To find the issue in the implementation, manual checks or automated static analysis could be applied to the XML configuration files.

Correction automatique Plexicus

Plexicus détecte automatiquement CWE-110 et ouvre une PR de correction en moins de 60 secondes.

Codex Remedium analyse chaque commit, identifie cette faiblesse précise et livre une pull request prête à être relue avec le correctif. Pas de tickets. Pas de transferts.

Questions fréquentes

Frequently asked questions

Qu'est-ce que CWE-110 ?

This vulnerability occurs when a Struts application's validation configuration file references form fields that no longer exist in the corresponding ActionForm class. This mismatch indicates outdated validation logic that can fail to properly check user input.

Quelle est la gravité de CWE-110 ?

MITRE n'a pas publié de note de probabilité d'exploitation pour cette faiblesse. Traitez-la comme un impact moyen jusqu'à ce que votre modèle de menace prouve le contraire.

Quels langages ou plateformes sont affectés par CWE-110 ?

MITRE lists the following affected platforms: Java.

Comment puis-je prévenir CWE-110 ?

Use safe-by-default frameworks, validate untrusted input at trust boundaries, and apply the principle of least privilege. Cover the data-flow signature in CI with SAST.

Comment Plexicus détecte et corrige CWE-110 ?

Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-110 à chaque commit. Lorsqu'une correspondance est trouvée, notre agent Codex Remedium ouvre une PR de correction avec le code corrigé, les tests et un résumé d'une ligne pour le relecteur.

Où puis-je en savoir plus sur CWE-110 ?

MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/110.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.

Prêt quand vous l'êtes

Arrêtez de payer par développeur.
Commencez à fermer la boucle.

Plexicus est l'ASPM natif IA qui scanne, filtre, corrige, penteste et explique — de façon autonome. Développeurs illimités, dépôts illimités, actions IA à usage équitable. Vrai niveau gratuit, €269/mo annuel quand vous êtes prêt.