CWE-451 Classe Rascunho

User Interface (UI) Misrepresentation of Critical Information

This vulnerability occurs when a user interface fails to accurately display or highlight crucial information, potentially misleading users about the true state of the system or the source of data.…

Definição

What is CWE-451?

This vulnerability occurs when a user interface fails to accurately display or highlight crucial information, potentially misleading users about the true state of the system or the source of data. Attackers exploit this weakness to trick users into performing unintended actions, often as part of phishing campaigns or other deception-based attacks.
When an application's UI misrepresents critical data—whether by showing incorrect information, obscuring it, or spoofing its origin—it breaks the user's trust in the interface. This can lead directly to security failures, such as users approving dangerous transactions, downloading malicious files, or ignoring genuine security alerts because they appear untrustworthy. Essentially, if the user cannot rely on what they see, they become vulnerable to manipulation. Common attack methods include overlaying fake elements over legitimate ones (clickjacking), manipulating file icons to hide dangerous extensions, exploiting race conditions to show false status indicators, or using visual tricks like character homographs in URLs. Developers must treat the UI as a critical security layer, ensuring it consistently and clearly communicates the true system state, source of information, and potential risks without ambiguity or omission.
Impacto no mundo real

Real-world CVEs caused by CWE-451

  • Web browser's filename selection dialog only shows the beginning portion of long filenames, which can trick users into launching executables with dangerous extensions.

  • Attachment with many spaces in filename bypasses "dangerous content" warning and uses different icon. Likely resultant.

  • Misrepresentation and equivalence issue.

  • Lock spoofing from several different weaknesses.

  • Incorrect indicator: web browser can be tricked into presenting the wrong URL

  • Incorrect indicator: Lock icon displayed when an insecure page loads a binary file loaded from a trusted site.

  • Incorrect indicator: Secure "lock" icon is presented for one channel, while an insecure page is being simultaneously loaded in another channel.

  • Incorrect indicator: Certain redirect sequences cause security lock icon to appear in web browser, even when page is not encrypted.

Como os atacantes a exploram

Trajeto do atacante passo a passo

  1. 1

    Identificar um caminho de código que trata input não confiável sem validação.

  2. 2

    Criar um payload que explora o comportamento inseguro — injeção, traversal, overflow ou abuso de lógica.

  3. 3

    Entregar o payload através de um pedido normal e observar a reação da aplicação.

  4. 4

    Iterar até que a resposta exponha dados, execute código do atacante ou escale privilégios.

Exemplo de código vulnerável

Vulnerable pseudo

A MITRE não publicou um exemplo de código para este CWE. O padrão abaixo é ilustrativo — consulte os Recursos para referências canónicas.

Vulnerável pseudo
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
  // Untrusted input flows directly into the sensitive sink.
  return executeUnsafe(input);
}
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-451

  • Implementation Perform data validation (e.g. syntax, length, etc.) before interpreting the data.
  • Architecture and Design Create a strategy for presenting information, and plan for how to display unusual characters.
Sinais de deteção

How to detect CWE-451

SAST High

Executar análise estática (SAST) na base de código à procura do padrão inseguro no fluxo de dados.

DAST Moderate

Executar testes dinâmicos de segurança de aplicações (DAST) contra o endpoint em execução.

Runtime Moderate

Monitorizar os registos em tempo de execução para traços de exceção invulgares, input malformado ou tentativas de contornar a autorização.

Code review Moderate

Revisão de código: sinalizar qualquer novo código que trate input desta superfície sem usar os ajudantes validados do framework.

Correção automática do Plexicus

O Plexicus deteta automaticamente o CWE-451 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-451?

This vulnerability occurs when a user interface fails to accurately display or highlight crucial information, potentially misleading users about the true state of the system or the source of data. Attackers exploit this weakness to trick users into performing unintended actions, often as part of phishing campaigns or other deception-based attacks.

Qual a gravidade do CWE-451?

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-451?

A MITRE não especificou as plataformas afetadas por este CWE — pode aplicar-se à maioria das stacks de aplicações.

Como posso prevenir o CWE-451?

Perform data validation (e.g. syntax, length, etc.) before interpreting the data. Create a strategy for presenting information, and plan for how to display unusual characters.

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

O motor SAST do Plexicus correlaciona a assinatura de fluxo de dados do CWE-451 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-451?

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

Fraquezas relacionadas

Weaknesses related to CWE-451

CWE-684 Pai

Incorrect Provision of Specified Functionality

This weakness occurs when software behaves differently than its documented specifications, which can mislead users and create security…

CWE-1245 Irmão

Improper Finite State Machines (FSMs) in Hardware Logic

This vulnerability occurs when hardware logic contains flawed Finite State Machines (FSMs). Attackers can exploit these design errors to…

CWE-392 Irmão

Missing Report of Error Condition

This vulnerability occurs when a system fails to properly signal that an error has happened. Instead of returning a clear error code,…

CWE-393 Irmão

Return of Wrong Status Code

This vulnerability occurs when a function returns an inaccurate status code or value that misrepresents the actual outcome of an…

CWE-440 Irmão

Expected Behavior Violation

This weakness occurs when a software component, such as a function, API, or feature, fails to act as documented or intended. The system's…

CWE-446 Irmão

UI Discrepancy for Security Feature

This vulnerability occurs when a user interface incorrectly displays a security feature as active or properly configured, misleading users…

CWE-912 Irmão

Hidden Functionality

Hidden functionality refers to undocumented features, commands, or code within a product that are not part of its official specification…

CWE-346 Par

Origin Validation Error

This vulnerability occurs when an application fails to properly confirm the true origin of incoming data or communication, allowing…

CWE-1007 Filho

Insufficient Visual Distinction of Homoglyphs Presented to User

This vulnerability occurs when an application shows text or symbols to users without clearly distinguishing between characters that look…

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.