CWE-455 Base Rascunho

Non-exit on Failed Initialization

This vulnerability occurs when software continues to run as normal after encountering a critical security failure during its startup process. Instead of halting or entering a safe mode, the…

Definição

What is CWE-455?

This vulnerability occurs when software continues to run as normal after encountering a critical security failure during its startup process. Instead of halting or entering a safe mode, the application proceeds with weakened or missing security controls, leaving it exposed.
During initialization, an application loads its core security components—like configuration files, encryption keys, or connections to hardware security modules (HSMs). If any of these critical steps fail (e.g., due to a corrupted config file, an invalid certificate, or an HSM communication error), the software faces a crucial decision. A secure design would force a controlled shutdown or trigger a strict fallback state. However, with this weakness, the program ignores the failure and continues its normal startup routine, often with default, insecure settings or with key security features silently disabled. This creates a dangerous gap between the administrator's intended security posture and the application's actual runtime state. An attacker doesn't need to exploit the initial failure; they can simply target the now-unprotected system. For example, communications might proceed without encryption, authentication checks could be bypassed, or audit logging might be turned off—all without any visible warning. To prevent this, initialization routines must treat security-critical failures as fatal errors, ensuring the software either fails securely or enters a well-defined, restrictive operational mode that alerts administrators immediately.
Impacto no mundo real

Real-world CVEs caused by CWE-455

  • Product does not trigger a fatal error if missing or invalid ACLs are in a configuration file.

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 Perl

The following code intends to limit certain operations to the administrator only.

Vulnerável Perl
$username = GetCurrentUser();
  $state = GetStateData($username);
  if (defined($state)) {
  	$uid = ExtractUserID($state);
  }
```
# do stuff* 
  if ($uid == 0) {
  ```
  	DoAdminThings();
  }
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-455

  • Implementation Follow the principle of failing securely when an error occurs. The system should enter a state where it is not vulnerable and will not display sensitive error messages to a potential attacker.
Sinais de deteção

How to detect CWE-455

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

This vulnerability occurs when software continues to run as normal after encountering a critical security failure during its startup process. Instead of halting or entering a safe mode, the application proceeds with weakened or missing security controls, leaving it exposed.

Qual a gravidade do CWE-455?

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

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

Follow the principle of failing securely when an error occurs. The system should enter a state where it is not vulnerable and will not display sensitive error messages to a potential attacker.

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

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

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

Fraquezas relacionadas

Weaknesses related to CWE-455

CWE-705 Pai

Incorrect Control Flow Scoping

This vulnerability occurs when a program fails to return execution to the correct point in the code after finishing a specific operation…

CWE-248 Irmão

Uncaught Exception

This vulnerability occurs when a function throws an error or exception, but the calling code does not have a proper handler to catch and…

CWE-382 Irmão

J2EE Bad Practices: Use of System.exit()

This vulnerability occurs when a J2EE application directly calls System.exit(), which forcibly terminates the entire application server…

CWE-395 Irmão

Use of NullPointerException Catch to Detect NULL Pointer Dereference

Using a try-catch block for NullPointerException as a substitute for proper null checks is an anti-pattern. This approach masks the root…

CWE-396 Irmão

Declaration of Catch for Generic Exception

This weakness occurs when code catches a generic exception type like 'Exception' or 'Throwable', which can hide specific errors and create…

CWE-397 Irmão

Declaration of Throws for Generic Exception

This vulnerability occurs when a method is declared to throw an overly broad exception type, such as a generic 'Exception' or 'Throwable'.…

CWE-584 Irmão

Return Inside Finally Block

This vulnerability occurs when a function places a return statement inside a finally block. This dangerous pattern silently discards any…

CWE-698 Irmão

Execution After Redirect (EAR)

Execution After Redirect (EAR) occurs when a web application sends a redirect response to a user's browser but continues to run…

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.