CWE-778 Base Draft Medium likelihood

Insufficient Logging

This weakness occurs when an application fails to properly record important security events or captures them with insufficient detail, making it hard to spot and investigate suspicious activity.

Definition

What is CWE-778?

This weakness occurs when an application fails to properly record important security events or captures them with insufficient detail, making it hard to spot and investigate suspicious activity.
Insufficient logging creates blind spots for security teams. When critical events—like failed logins, privilege escalations, or data access—aren't logged with enough detail, detecting attacks in progress becomes nearly impossible. This also severely hampers post-incident forensic analysis, leaving you without the evidence needed to understand how a breach happened or what data was affected. Modern cloud environments often introduce this risk through misconfiguration. Cloud services frequently have detailed logging disabled by default to manage costs and performance. If developers don't explicitly enable and configure audit logs for services like storage buckets, databases, or identity management, critical telemetry gaps appear. These gaps in your security logs can allow malicious activity to go completely unnoticed.
Auswirkungen in der Praxis

Real-world CVEs caused by CWE-778

  • 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

Wie Angreifer es ausnutzen

Angreiferpfad Schritt für Schritt

  1. 1

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

  2. 2

    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.

  3. 3

    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).

  4. 4

    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.

  5. 5

    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.

Verwundbares Codebeispiel

Vulnerable XML

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

Verwundbar XML
<system.serviceModel>
  	<behaviors>
  		<serviceBehaviors>
  			<behavior name="NewBehavior">
  				<serviceSecurityAudit auditLogLocation="Default"
  				suppressAuditFailure="false"
  				serviceAuthorizationAuditLevel="None"
  				messageAuthenticationAuditLevel="None" />
  			...
  </system.serviceModel>
Sicheres Codebeispiel

Secure XML

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).

Sicher XML
<system.serviceModel>
  	<behaviors>
  		<serviceBehaviors>
  			<behavior name="NewBehavior">
  				<serviceSecurityAudit auditLogLocation="Default"
  				suppressAuditFailure="false"
  				serviceAuthorizationAuditLevel="SuccessAndFailure"
  				messageAuthenticationAuditLevel="SuccessAndFailure" />
  			 ...
  </system.serviceModel>
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Präventions-Checkliste

How to prevent CWE-778

  • 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.
Erkennungssignale

How to detect CWE-778

Automated Static Analysis High

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.)

CWE-778

Don't catalog this weakness. Prove it's reachable.

Plexicus turns CWE catalogs into evidence: every CWE-pattern is matched against your real code graph, reach is proven on a sandbox clone, and verified findings ship as reviewed PRs.

Häufig gestellte Fragen

Frequently asked questions

Was ist CWE-778?

This weakness occurs when an application fails to properly record important security events or captures them with insufficient detail, making it hard to spot and investigate suspicious activity.

Wie gravierend ist CWE-778?

MITRE stuft die Exploit-Wahrscheinlichkeit als mittel ein — eine Ausnutzung ist realistisch, erfordert aber meist bestimmte Bedingungen.

Welche Sprachen oder Plattformen sind von CWE-778 betroffen?

MITRE lists the following affected platforms: Cloud Computing.

Wie kann ich CWE-778 verhindern?

Use a centralized logging mechanism that supports multiple levels of detail. 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.

Wie erkennt und behebt Plexicus CWE-778?

Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-778 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.

Wo erfahre ich mehr über CWE-778?

MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/778.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.

Bereit, das Wesentliche zu validieren?

Bereit zu validieren, was zählt.

Plexicus ist Proof-Driven AppSec: validierte Funde, kontextuelles Verständnis und geprüfte Remediation — in Evidenz verankert, mit Ihnen gescoped.

Qualifizierung

Prüfen Sie, ob AI Swarm Pentest zu Ihrer Umgebung passt.

Teilen Sie den wichtigsten Kontext. Wir prüfen den Umfang und nennen den nächsten kommerziellen Schritt.

Vor dem Absenden — prüfen Sie, ob Sie passen

0 / 280

Keine Verpflichtung. Wenn Sie nicht passen, sagen wir es Ihnen.

SAMPLE HANDOVER · ILLUSTRATIVE

Sample evidence handover

A trimmed view of what your team receives at the end of an AI Swarm Pentest engagement. Real engagements include full technical evidence, executive narrative, and a remediation plan.

VALIDATED FINDING Evidence attached

Server-Side Request Forgery in webhooks/receiver

demo-project/sample-app · src/webhooks/receiver.py:42

SeverityHigh CVSS 3.18.6 Priority79 Confirmedvia replay

Untrusted caller-supplied URLs reach an internal egress without an allowlist. Replayed in a sandbox against a fresh authorized target — the same control was validated to fail twice.

REVIEWER-READY REMEDIATION Merge-ready PR

Validate the target URL against an allowlist of permitted hostnames. Reject private/internal IP ranges. Enforce HTTPS only.

plexicus/remediation/webhooks-ssrf 3 changed · 0 new files
42resp = requests.get(target_url)
42+if not is_allowed_host(target_url):
43+  raise WebhookRejected(target_url)
44+resp = requests.get(target_url, timeout=5)
Every engagement hands over:
  • Executive briefing
  • Validated findings list
  • Merge-ready PRs
  • Compliance mapping (NIS2 · DORA · CRA)
Private Runde Für Investoren