CWE-110 Variante Rascunho

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…

Definição

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.
Impacto no mundo real

Real-world CVEs caused by CWE-110

Ainda não há referências CVE públicas associadas a este CWE no catálogo da MITRE.

Como os atacantes a exploram

Trajeto do atacante passo a passo

  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.

Exemplo de código vulnerável

Vulnerable Java

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

Vulnerável 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;
  		}
  }
Exemplo de código seguro

Secure pseudo

Seguro 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.
Lista de verificação de prevenção

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.
Sinais de deteção

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.

Correção automática do Plexicus

O Plexicus deteta automaticamente o CWE-110 e abre um PR de correção em menos de 60 segundos.

O Codex Remedium analisa cada commit, identifica esta fraqueza exata e entrega um pull request pronto para revisão com o patch. Sem tickets. Sem transferências.

Perguntas frequentes

Frequently asked questions

O que é o 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.

Qual a gravidade do CWE-110?

A MITRE não publicou uma classificação de probabilidade de exploração para esta fraqueza. Trate-a como impacto médio até o seu modelo de ameaças provar o contrário.

Que linguagens ou plataformas são afetadas pelo CWE-110?

MITRE lists the following affected platforms: Java.

Como posso prevenir o 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.

Como é que o Plexicus deteta e corrige o CWE-110?

O motor SAST do Plexicus correlaciona a assinatura de fluxo de dados do CWE-110 em cada commit. Quando é encontrada uma correspondência, o nosso agente Codex Remedium abre um PR de correção com o código corrigido, testes e um resumo de uma linha para o revisor.

Onde posso saber mais sobre o CWE-110?

A MITRE publica a definição canónica em https://cwe.mitre.org/data/definitions/110.html. Pode também consultar a documentação da OWASP e do NIST para orientações adjacentes.

Pronto quando você estiver

Pare de pagar por desenvolvedor.
Comece a fechar o ciclo.

O Plexicus é o ASPM nativo de IA que verifica, filtra, corrige, pentesta e explica — de forma autónoma. Programadores ilimitados, repos ilimitados, ações de IA de utilização justa. Nível gratuito real, €269/mo anual quando estiver pronto.