Base · Medium

CWE-455: Non-exit on Failed Initialization

The product does not exit or otherwise modify its operation when security-relevant errors occur during initialization, such as when a configuration file has a format error or a hardware security modul...

CWE-455 · Base Level ·1 CVEs ·1 Mitigations

Description

The product does not exit or otherwise modify its operation when security-relevant errors occur during initialization, such as when a configuration file has a format error or a hardware security module (HSM) cannot be activated, which can cause the product to execute in a less secure fashion than intended by the administrator.

Potential Impact

Integrity, Other

Modify Application Data, Alter Execution Logic

Demonstrative Examples

The following code intends to limit certain operations to the administrator only.
Bad
$username = GetCurrentUser();$state = GetStateData($username);if (defined($state)) {$uid = ExtractUserID($state);}
                     
                     # do stuff
                     if ($uid == 0) {DoAdminThings();}
If the application is unable to extract the state information - say, due to a database timeout - then the $uid variable will not be explicitly set by the programmer. This will cause $uid to be regarded as equivalent to "0" in the conditional, allowing the original user to perform administrator actions. Even if the attacker cannot directly influence the state data, unexpected errors could cause incorrect privileges to be assigned to a user just by accident.

Mitigations & Prevention

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.

Real-World CVE Examples

CVE IDDescription
CVE-2005-1345Product does not trigger a fatal error if missing or invalid ACLs are in a configuration file.

Taxonomy Mappings

  • PLOVER: — Non-exit on Failed Initialization

Frequently Asked Questions

What is CWE-455?

CWE-455 (Non-exit on Failed Initialization) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product does not exit or otherwise modify its operation when security-relevant errors occur during initialization, such as when a configuration file has a format error or a hardware security modul...

How can CWE-455 be exploited?

Attackers can exploit CWE-455 (Non-exit on Failed Initialization) to modify application data, alter execution logic. This weakness is typically introduced during the Implementation phase of software development.

How do I prevent CWE-455?

Key mitigations include: 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.

What is the severity of CWE-455?

CWE-455 is classified as a Base-level weakness (Medium abstraction). It has been observed in 1 real-world CVEs.