Common Weakness Enumeration

A Community-Developed List of Software Weakness Types

CWE/SANS Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (2.11)  

CWE-778: Insufficient Logging

Weakness ID: 778
Abstraction: Base
Status: Draft
Presentation Filter:
+ Description

Description Summary

When a security-critical event occurs, the software either does not record the event or omits important details about the event when logging it.

Extended Description

When security-critical events are not logged properly, such as a failed login attempt, this can make malicious behavior more difficult to detect and may hinder forensic analysis after an attack succeeds.

+ Time of Introduction
  • Operation
+ Applicable Platforms



+ Common Consequences

Technical Impact: Hide activities

If security critical information is not recorded, there will be no trail for forensic analysis and discovering the cause of problems or the source of attacks may become more difficult or impossible.

+ Likelihood of Exploit


+ Demonstrative Examples

Example 1

The example below shows a configuration for the service security audit feature in the Windows Communication Foundation (WCF).

(Bad Code)
Example Language: XML 
<behavior name="NewBehavior">
<serviceSecurityAudit auditLogLocation="Default"
messageAuthenticationAuditLevel="None" />

The previous configuration file has effectively disabled the recording of security-critical events, which would force the administrator to look to other sources during debug or recovery efforts.

Logging failed authentication attempts can warn administrators of potential brute force attacks. Similarly, logging successful authentication events can provide a useful audit trail when a legitimate account is compromised. The following configuration shows appropriate settings, assuming that the site does not have excessive traffic, which could fill the logs if there are a large number of success or failure events (CWE-779).

(Good Code)
Example Language: XML 
<behavior name="NewBehavior">
<serviceSecurityAudit auditLogLocation="Default"
messageAuthenticationAuditLevel="SuccessAndFailure" />
+ Observed Examples
server does not log failed authentication attempts, making it easier for attackers to perform brute force password guessing without being detected
admin interface does not log failed authentication attempts, making it easier for attackers to perform brute force password guessing without being detected
default configuration for POP server does not log source IP or username for login attempts
proxy does not log requests without "http://" in the URL, allowing web surfers to access restricted web content without detection
web server does not log requests for a non-standard request type
+ Potential Mitigations

Phase: Architecture and Design

Use a centralized logging mechanism that supports multiple levels of detail. Ensure that all security-related successes and failures can be logged.

Phase: Operation

Be sure to set the level of logging appropriately in a production environment. Sufficient data should be logged to enable system administrators to detect attacks, diagnose errors, and recover from attacks. At the same time, logging too much data (CWE-779) can cause the same problems.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfWeakness BaseWeakness Base223Omission of Security-relevant Information
Development Concepts (primary)699
Research Concepts (primary)1000
ChildOfCategoryCategory254Security Features
Development Concepts699
ChildOfWeakness ClassWeakness Class693Protection Mechanism Failure
Research Concepts1000
+ References
[REF-7] Mark Dowd, John McDonald and Justin Schuh. "The Art of Software Security Assessment". Chapter 2, "Accountability", Page 40.. 1st Edition. Addison Wesley. 2006.
+ Content History
Submission DateSubmitterOrganizationSource
2009-07-02Internal CWE Team
Contribution DateContributorOrganizationSource
2009-07-02Fortify SoftwareContent
Provided code example and additional information for description and consequences.
Modification DateModifierOrganizationSource
2011-06-01CWE Content TeamMITREInternal
updated Common_Consequences
2012-05-11CWE Content TeamMITREInternal
updated References

More information is available — Please select a different filter.
Page Last Updated: May 05, 2017