---
title: "CWE-778: Insufficient Logging"
url: https://radicalnotion.ai/cwe/cwe-778
type: cwe
description: "When a security-critical event occurs, the product either does not record the event or omits important details about the event when logging it."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-778: Insufficient Logging

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 46
- **Of those, in CISA KEV:** 1
- **New in 2026:** 26
- **CWE catalog version:** 4.21

## Description

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

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | As organizations adopt cloud storage resources, these technologies often require configuration changes to enable detailed logging information, since detailed logging can incur additional costs. This could lead to telemetry gaps in critical audit logs. For example, in Azure, the default value for logging is disabled. |
| Operation | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |

## Applicable platforms

**Languages:** Python (Undetermined)

**Technologies:** Cloud Computing (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Non-Repudiation | Hide Activities | Malicious behavior can become more difficult to detect, such as a failed login attempt. This may hinder forensic analysis after an attack succeeds. 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. |

## Potential mitigations

### Architecture and Design

Use a centralized logging mechanism that supports multiple levels of detail.

### Implementation

Ensure that all security-related successes and failures can be logged. When storing data in the cloud (e.g., AWS S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to enable and capture detailed logging information.

### 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, including unexpected costs when using a cloud environment.

### Operation

To enable storage logging using Azure's Portal, navigate to the name of the Storage Account, locate Monitoring (CLASSIC) section, and select Diagnostic settings (classic). For each of the various properties (blob, file, table, queue), ensure the status is properly set for the desired logging data. If using PowerShell, the Set-AzStorageServiceLoggingProperty command could be called using appropriate -ServiceType, -LoggingOperations, and -RetentionDays arguments.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

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

Bad code:

```xml
<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="NewBehavior">
                <serviceSecurityAudit auditLogLocation="Default"
                suppressAuditFailure="false"
                serviceAuthorizationAuditLevel="None"
                messageAuthenticationAuditLevel="None" />
            ...
</system.serviceModel>
```

Good code:

```xml
<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="NewBehavior">
                <serviceSecurityAudit auditLogLocation="Default"
                suppressAuditFailure="false"
                serviceAuthorizationAuditLevel="SuccessAndFailure"
                messageAuthenticationAuditLevel="SuccessAndFailure" />
            ...
</system.serviceModel>
```

### Example 2

In the following Java example the code attempts to authenticate the user. If the login fails a retry is made. Proper restrictions on the number of login attempts are of course part of the retry functionality. Unfortunately, the failed login is not recorded and there would be no record of an adversary attempting to brute force the program.

Bad code:

```java
if LoginUser(){
    // Login successful
    RunProgram();
} else {
    // Login unsuccessful
    LoginRetry();
}
```

Good code:

```java
if LoginUser(){
    // Login successful
    log.warn("Login by user successful.");
    RunProgram();
} else {
    // Login unsuccessful
    log.warn("Login attempt by user failed, trying again.");
    LoginRetry();
}
```

It is recommended to log the failed login action. Note that unneutralized usernames should not be part of the log message, and passwords should never be part of the log message.

### Example 3

Consider this command for updating Azure's Storage Logging for Blob service, adapted from \[REF-1307\]:

Bad code:

```shell
az storage logging update --account-name --account-key --services b --log d --retention 90
```

Good code:

```shell
az storage logging update --account-name --account-key --services b --log rwd --retention 90
```

Good code:

```shell
Set-AzStorageServiceLoggingProperty -ServiceType Queue -LoggingOperations read,write,delete -RetentionDays 5 -Context $MyContextObject
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2008-4315 | server does not log failed authentication attempts, making it easier for attackers to perform brute force password guessing without being detected |
| CVE-2008-1203 | admin interface does not log failed authentication attempts, making it easier for attackers to perform brute force password guessing without being detected |
| CVE-2007-3730 | default configuration for POP server does not log source IP or username for login attempts |
| CVE-2007-1225 | proxy does not log requests without "http://" in the URL, allowing web surfers to access restricted web content without detection |
| CVE-2003-1566 | web server does not log requests for a non-standard request type |

## Real CVEs with this weakness (sample of 12 of 46)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-41709 | ESX insufficient logging vulnerability | low | 2.7 | - | Yes | 2026-07-30 |
| CVE-2024-48967 | Life2000 ventilator and Service PC lack sufficient audit logging capabilities | critical | 10.0 | - | No | 2024-11-14 |
| CVE-2026-76208 | phpMyFAQ 3.1.0 before 4.1.7 Authentication Bypass via LDAP | high | 8.8 | - | No | 2026-08-19 |
| CVE-2026-82863 | @hulumi/baseline before 1.3.2 CloudTrail Selector Tampering Detection | high | 8.7 | - | No | 2026-08-31 |
| CVE-2025-52644 | HCL AION is affected by a vulnerability where certain user actions are not adequately audited or logged. | high | 8.2 | - | No | 2026-03-16 |
| CVE-2026-85959 | Insufficient authentication logging in Progress MarkLogic Server | high | 7.5 | - | No | 2026-10-12 |
| CVE-2026-22279 | - | high | 7.5 | - | No | 2026-01-22 |
| CVE-2021-43419 | - | high | 7.5 | - | No | 2023-11-07 |
| CVE-2023-1995 | Insufficient Logging Vulnerability in HiRDB | high | 7.5 | - | No | 2023-08-29 |
| CVE-2022-30305 | - | high | 7.5 | - | No | 2022-12-06 |
| CVE-2019-7613 | - | high | 7.5 | - | No | 2019-03-25 |
| CVE-2020-37268 | Coq and Rocq Prover Print Assumptions Omits Unsafe Universe Checking Inlined Through Parameter Inline | medium | 6.8 | - | No | 2026-08-24 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-223](https://radicalnotion.ai/cwe/cwe-223) | Omission of Security-relevant Information |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| OpenSSF Secure Coding Guide for Python | Implement Informative Event Logging | pyscg-0020 | - |
| PLC Top 20 | Log PLC uptime and trend it on the HMI | 17 | - |
| PLC Top 20 | Log PLC hard stops and trend them on the HMI | 18 | - |

## Frequently asked questions

### What is CWE-778?

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

### What CVEs are caused by CWE-778?

46 recorded CVEs are attributed to CWE-778, including CVE-2026-41709, CVE-2024-48967 and CVE-2026-76208. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-778?

Use a centralized logging mechanism that supports multiple levels of detail.

### How is CWE-778 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-778?

Exploiting CWE-778 can lead to: Hide Activities.

### Is CWE-778 actively exploited?

Yes. 1 CWE-778 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 46 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/778.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-778). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
