Security

What is Logging of Excessive Data (CWE-779)?

Learn how logging excessive data can impact system performance and security, with real-world examples and framework-specific fixes. Detect and prevent...

SP
Shreya Pillai July 29, 2026 5 min read Security
AI-friendly summary

What it is: Logging of Excessive Data (CWE-779) is a vulnerability where systems log too much information, making logs hard to process and hindering recovery efforts.

Why it matters: This can consume excessive resources like disk space and CPU, impacting system performance and forensic analysis capabilities.

How to fix it: Implement strategies such as suppressing duplicate log messages and setting maximum file sizes.

TL;DR: Logging of Excessive Data (CWE-779) is a vulnerability where systems generate overly verbose logs, impacting system performance and forensic analysis. Fixing this involves limiting excessive logging through configuration adjustments.

Field Value
CWE ID CWE-779
OWASP Category Not directly mapped
CAPEC None known
Typical Severity Low
Affected Technologies any backend language
Detection Difficulty Moderate
Last Updated 2026-07-29

What is Logging of Excessive Data?

Logging of Excessive Data (CWE-779) is a type of vulnerability where systems log too much information, making logs hard to process and hindering recovery efforts. As defined by the MITRE Corporation under CWE-779, this issue can significantly impact system performance and forensic analysis capabilities.

Quick Summary

Logging excessive data impacts system performance by consuming disk space and CPU resources. It also hinders forensic analysis after an attack, making it difficult to identify critical events or patterns. Jump to: Overview · How It Works · Business Impact · Attack Scenario · Detection · Fixing · Framework Fixes · Asking AI

Jump to: Quick Summary · Logging of Excessive Data Overview · How Logging of Excessive Data Works · Business Impact of Logging of Excessive Data · Logging of Excessive Data Attack Scenario · How to Detect Logging of Excessive Data · How to Fix Logging of Excessive Data · Framework-Specific Fixes for Logging of Excessive Data · How to Ask AI to Check Your Code for Logging of Excessive Data · Logging of Excessive Data Best Practices Checklist · Logging of Excessive Data FAQ · Vulnerabilities Related to Logging of Excessive Data · References · Scan Your Own Site

Logging of Excessive Data Overview

What: This vulnerability occurs when systems generate overly verbose logs that are hard to manage and analyze. Why it matters: Overly detailed logging can consume excessive resources, impacting system performance and hindering forensic analysis after an attack. Where it occurs: Any backend language or application generating extensive log files. Who is affected: System administrators, developers, and security analysts who rely on logs for troubleshooting and incident response. Who is NOT affected: Systems that maintain a balanced approach to logging, ensuring logs are concise and useful.

How Logging of Excessive Data Works

Root Cause

The root cause lies in the lack of proper configuration or oversight when setting up log files. This leads to excessive data being logged without necessary filtering or size limitations.

Attack Flow

  1. The system generates extensive log entries for every minor event.
  2. Over time, these logs grow excessively large and consume disk space.
  3. System performance degrades due to the overhead of managing huge log files.
  4. Forensic analysis becomes difficult as critical events are buried in redundant data.

    Prerequisites to Exploit

    • The system must be configured to generate excessive log entries without proper filtering or size limits.
    • Log files need to grow significantly before impacting system resources and forensic capabilities.

      Vulnerable Code

      def log_event(event):
       with open('log.txt', 'a') as file:
         file.write(f'{event}\n')
      

      This code logs every event to a text file without any filtering or size limits.

Secure Code

import logging

logging.basicConfig(filename='secure_log.log', level=logging.INFO, maxBytes=1048576, backupCount=5)
def log_event(event):
    if len(logging.getLogger().handlers) > 0:
        logging.info(event)

This secure code uses Python’s logging module with size and file count limits to prevent excessive data logging.

Business Impact of Logging of Excessive Data

Availability

  • Resource Consumption (CPU): Large log files can consume significant CPU resources, slowing down the system.
  • Resource Consumption (Other): Disk space is consumed by large log files, potentially leading to storage exhaustion.
  • Real-world consequence: System performance degradation and potential denial-of-service due to resource exhaustion.

Logging of Excessive Data Attack Scenario

  1. The attacker sends numerous requests that trigger extensive logging in the system’s logs.
  2. Over time, these logs grow excessively large, consuming disk space and CPU resources.
  3. As log files expand, they start impacting system performance by slowing down operations.
  4. System administrators struggle to manage and analyze logs due to their excessive size and redundancy.
  5. The attacker leverages this situation to hide malicious activities in the vast amount of data.

How to Detect Logging of Excessive Data

Manual Testing

  • Check log files for repetitive or unnecessary entries.
  • Verify that log file sizes do not exceed predefined limits.
  • Ensure logging levels are appropriately set during production deployment.

    Automated Scanners (SAST / DAST)

    Static analysis can identify code patterns that generate excessive logs, while dynamic testing helps verify actual resource consumption during runtime.

    PenScan Detection

    PenScan’s scanner engines such as ZAP and Wapiti flag instances of excessive data logging by analyzing log file sizes and content.

    False Positive Guidance

    A false positive may occur if a system is generating detailed logs for legitimate reasons without impacting performance or analysis capabilities.

How to Fix Logging of Excessive Data

  • Suppress large numbers of duplicate log messages and replace them with periodic summaries.
  • Support a maximum size for the log file that can be controlled by an administrator.
  • Adjust configurations appropriately when transitioning from debug state to production.

Framework-Specific Fixes for Logging of Excessive Data

import logging

logging.basicConfig(filename='secure_log.log', level=logging.INFO, maxBytes=1048576, backupCount=5)
def log_event(event):
    if len(logging.getLogger().handlers) > 0:
        logging.info(event)

This Python example uses the logging module to enforce a maximum file size and number of backups.

How to Ask AI to Check Your Code for Logging of Excessive Data

Copy-paste prompt

Review the following Python code block for potential CWE-779 Logging of Excessive Data vulnerabilities and rewrite it using logging configurations: [paste code here]

Logging of Excessive Data Best Practices Checklist

✅ Suppress large numbers of duplicate log messages. ✅ Implement periodic summaries in place of repetitive entries. ✅ Set a maximum size limit for log files that can be controlled by an administrator. ✅ Adjust configurations when transitioning from debug state to production deployment. ✅ Regularly monitor and manage log file sizes to prevent resource consumption.

Logging of Excessive Data FAQ

How does logging of excessive data impact system performance?

Logging too much information can consume disk space, CPU resources, and hinder forensic analysis after an attack.

What are common symptoms of logging excessive data in a system?

Symptoms include large log files that slow down the system or prevent recovery efforts following an incident.

How do you detect logging of excessive data in your application logs?

Look for repetitive, unnecessary messages and check if log file sizes exceed predefined limits.

What are best practices to avoid logging excessive data?

Configure maximum log file sizes, suppress duplicate entries, and adjust logging levels during production deployment.

Can you provide an example of secure code that avoids logging excessive data?

Use conditional statements to limit the number of repeated messages and implement a mechanism to alert administrators when logs exceed size limits.

How does logging excessive data affect forensic analysis after an attack?

Excessive log data can overwhelm analysts, making it difficult to identify critical events or patterns during post-attack investigations.

What are the potential consequences of not addressing logging of excessive data in a system?

System performance degradation and reduced effectiveness of forensic analyses leading to delayed incident response.

| CWE | Name | Relationship | |—|—|—| | CWE-400 | Uncontrolled Resource Consumption (ChildOf) |

References

Scan Your Own Site

Manual code review catches what you know to look for. An automated scan catches what you didn’t. Scan your own website using PenScan to find Logging of Excessive Data and other risks before an attacker does.