Insufficient Logging & Monitoring - Overview
Table of Contents
What is Insufficient Logging & Monitoring?
Insufficient Logging & Monitoring is the failure to record security-relevant events, to watch those records for signs of attack, and to respond when something is found. It is unusual among the OWASP Top 10 because it is not a vulnerability an attacker exploits directly—it is a detection and response gap. Every other category describes how an intruder gets in; this one describes why nobody noticed, why the intrusion continued for weeks or months, and why the investigation afterwards had no evidence to work with.
This category was introduced as A10:2017 in the OWASP Top 10 2017, selected largely from an industry survey rather than from raw vulnerability data, precisely because practitioners saw it repeatedly as the reason breaches escalated from a contained incident into a catastrophe. In the OWASP Top 10 2021 it was renamed and broadened to A09:2021 – Security Logging and Monitoring Failures, but the core idea is unchanged. This lesson uses the 2017 framing.
At its core, the failure appears in three linked stages:
- Logging gaps: security-relevant events—logins, access-control denials, input-validation failures, high-value transactions—are never written down, or are written without enough context to be useful.
- Monitoring gaps: logs exist but sit unread on individual servers, are never centralised, and trigger no alerts, so a real attack looks identical to normal noise.
- Response gaps: even when an alert does fire, there is no defined process, owner, or escalation path, so the signal is ignored or lost.
Core Concept
Adequate detection:
Security event -> logged with full context (who/what/when/where/outcome)
Logs -> shipped to a central, tamper-resistant store
Monitoring -> correlated and alerted on in near real time
Alert -> owned, triaged, and escalated by a defined process
Result -> attacker detected in minutes/hours, evidence preserved
Insufficient logging & monitoring:
Security event -> not logged, or logged without actor/IP/outcome
Logs -> only on the local box, rotated away, or deletable
Monitoring -> nobody watches; no thresholds, no alerts
Alert -> none, or fired into an unmonitored inbox
Result -> attacker operates for months, no evidence to investigate
What Counts as a "Security-Relevant" Event
Not every log line matters for security. The events that do—the ones whose absence defines this category—include:
- Authentication: successful logins, failed logins, logouts, password changes, MFA challenges, and account lockouts.
- Access control: every authorization denial (HTTP 403), attempts to reach admin functions, and privilege changes.
- Input validation: server-side validation failures, which often signal probing for injection or path traversal.
- High-value actions: money movement, changes to roles/permissions, data exports, and deletion of records.
- Session and account lifecycle: session creation, token issuance, account creation, email/phone changes, and recovery flows.
- System integrity: application start/stop, configuration changes, and errors/exceptions that could indicate an attack.
Why Does This Matter?
Ranked #10 in the OWASP Top 10 2017, this category rarely causes the initial compromise—but it determines how bad the compromise becomes. A breach detected in minutes is an incident; the same breach detected in months is a headline.
Business Impact
- Prolonged breaches: without detection, attackers dwell, escalate, move laterally, and exfiltrate at leisure. Dwell time is measured in weeks to months across the industry.
- Discovery by outsiders: a large share of breaches are first reported by a third party—a customer, a bank, a researcher, or law enforcement—rather than by the victim's own monitoring, which is both embarrassing and a regulatory red flag.
- Failed or blind investigations: incident responders cannot reconstruct what happened without logs. "We don't know what data was taken" often forces the broadest, most expensive breach-notification posture.
- Regulatory and contractual exposure: PCI-DSS (Requirement 10), HIPAA, SOX, and GDPR all mandate audit logging and timely detection. Missing logs are themselves a finding, independent of the breach.
- Reputational damage: "attackers were inside for six months undetected" erodes trust far more than the initial technical flaw.
Technical Impact
- Slow attacks succeed: brute force, credential stuffing, and enumeration that would trip a threshold-based alert instead run to completion unnoticed.
- Persistence goes unseen: new admin accounts, backdoors, and scheduled tasks created by an attacker leave no reviewed trail.
- No forensic timeline: without synchronised timestamps and centralised logs, correlating events across servers is impossible after the fact.
- Evidence tampering: locally stored, world-writable logs let an attacker erase or forge entries to cover their tracks.
- Repeat compromise: without knowing the entry point, the same hole is left open and re-exploited.
Technical Context
Detection Is a Pipeline, Not a Log File
A useful mental model is that detection has four stages, and a break at any stage produces this vulnerability:
[1] GENERATE application emits an event with context
|
[2] COLLECT event is shipped off-box to central storage (SIEM/ELK)
|
[3] DETECT rules/thresholds/anomalies raise an alert
|
[4] RESPOND a human (or automation) triages and acts
A gap anywhere breaks the whole chain:
no [1] -> nothing to see no [2] -> logs die with the box
no [3] -> data exists, unseen no [4] -> alert fires into the void
Anatomy of a Good Log Event
An event is only useful if it answers who, what, when, where, and outcome. Compare a useless entry with a useful one:
BAD: "Login failed"
GOOD: 2026-08-28T14:03:22.481Z level=WARN event=auth.login.failure
user=alice src_ip=203.0.113.44 user_agent="curl/8.4"
method=password reason=bad_password
request_id=7f3c9a2e session=none outcome=denied
The good entry can be counted (how many failures from this IP?), correlated (same request_id across services), and acted on (block the source). The bad entry can do none of these.
Where Logs Should — and Should Not — Live
| Concern | Insufficient | Adequate |
|---|---|---|
| Storage | Local disk only, rotated away in days | Centralised, retained per policy (often 1 year+) |
| Integrity | World-writable file an attacker can edit | Append-only, shipped off-box, optionally signed |
| Format | Free-text, inconsistent per service | Structured (JSON/key-value), consistent schema |
| Time | Unsynchronised local clocks | NTP-synced, timezone-explicit (UTC/ISO 8601) |
| Monitoring | Nobody reads them | Correlated and alerted on in near real time |
The Two-Sided Danger: Too Little and Too Much
This category is usually about logging too little, but logging the wrong things is also a failure. Writing passwords, session tokens, full card numbers, or other secrets into logs turns your log store into a high-value target and can itself become a breach (and a Cryptographic Failures / PCI violation). The goal is complete security context without sensitive payloads.
Real-World Impact
The examples below are well-documented incident classes. They are described at the level of publicly reported root cause; treat any single figure as illustrative rather than exact.
Case Study 1: The Long-Dwell Retail/Payment Breach (2013–2014 era)
Pattern: Attackers reached point-of-sale systems and exfiltrated tens of millions of card records over a period of weeks. Monitoring tooling had actually generated alerts on the malicious activity, but those alerts were not acted upon.
Lesson: Logging and even alerting are not enough on their own. Without a response process that triages and escalates alerts, detection data is worthless. Stage [4] of the pipeline failed.
Case Study 2: The Credit-Bureau Data Exposure (2017)
Pattern: Exploitation of an unpatched web component let attackers exfiltrate sensitive personal records over roughly a two-and-a-half month period before discovery. Contributing factors publicly cited included expired monitoring on network traffic inspection, which left exfiltration unseen for an extended time.
Lesson: Monitoring controls that silently stop working are as dangerous as never having them. Detection coverage must itself be monitored (is the log pipeline healthy? are certificates current?).
Case Study 3: Slow Credential Stuffing Against Consumer Accounts
Pattern: A recurring class of incidents in which attackers replay large lists of breached username/password pairs against a login endpoint, spread slowly across many source IPs to stay under naive thresholds. Because failed and successful logins were not aggregated or alerted on, thousands of account takeovers accumulated before anyone noticed.
Lesson: Per-account and per-source aggregation with tuned thresholds is what turns invisible slow attacks into visible ones. Logging each attempt is necessary but insufficient without correlation.
Case Study 4: The Investigation With No Evidence
Pattern: A common consulting scenario rather than one named company—an organisation discovers a compromise (often from an outside tip) but finds that authentication logs were kept only a few days, application logs were free-text and un-centralised, and clocks were unsynchronised. Responders cannot establish the entry point, scope, or data taken.
Lesson: Retention, centralisation, and time synchronisation are not paperwork—they are the difference between a scoped incident and an open-ended, worst-case breach notification.
Prevalence and Detection
Insufficient Logging & Monitoring is best understood through its detectability rather than a single incidence percentage, and OWASP itself noted it is challenging to test for with automated tools because the failure is an absence.
- It is characterised as widespread—the survey basis for its 2017 inclusion reflected how routinely assessors found inadequate detection.
- Industry breach reports consistently show long dwell times (weeks to months) and a large fraction of breaches discovered by external parties rather than internal monitoring.
- It is a force multiplier: it rarely appears alone in an incident report but is present in almost every serious one, amplifying the impact of the flaw that enabled initial access.
Note: precise dwell-time and detection-source figures differ by report and year. The durable takeaway is that undetected attacks last far longer and cost far more, and that many victims learn of their breach from someone else.
Relevant CWE Mappings
- CWE-778: Insufficient Logging
- CWE-223: Omission of Security-relevant Information
- CWE-532: Insertion of Sensitive Information into Log File
- CWE-117: Improper Output Neutralization for Logs (log injection)
- CWE-693: Protection Mechanism Failure (defense-in-depth gap)
Common Misunderstandings
Myth 1: "We log everything, so we're covered"
Reality: Volume is not detection. Logs that nobody reads, that trigger no alerts, and that no process acts on provide no protection—they just consume disk. Detection requires collection, correlation, alerting, and response, not just generation.
Myth 2: "The web server access log is enough"
Reality: Access logs show requests, not security meaning. They rarely capture why an authorization was denied, which account changed a password, or that a transfer exceeded a threshold. Application-level security events must be logged deliberately.
Myth 3: "Logs on the server are safe evidence"
Reality: An attacker who reaches the host can read, edit, or delete local logs—often the first thing they do. Only logs shipped off-box to append-only, access-controlled storage survive as evidence.
Myth 4: "More logging is always better"
Reality: Excessive logging buries real signals in noise and risks capturing secrets (passwords, tokens, PII, full card numbers). Log the right security events with context, and never log sensitive payloads in cleartext.
Myth 5: "Alerts equal detection"
Reality: An alert that fires into an unmonitored inbox, or that is so noisy it is muted, detects nothing. Detection is only complete when an owned, tuned alert reaches a person or automation that acts—within a defined time.
Myth 6: "This is an ops problem, not a developer problem"
Reality: The application is the only component that knows a login failed for account alice, that a 403 was an admin-page probe, or that a transfer was high-value. Meaningful security logging must be built into application code; ops centralises and alerts on it.
Self-Assessment
Ask these questions about your application. "No" or "not sure" to several of them indicates real exposure:
- [ ] Are successful and failed logins logged with account, source IP, and outcome?
- [ ] Is every access-control denial (403) logged, including admin-function probes?
- [ ] Are high-value actions (money movement, role changes, data export/delete) logged with actor and before/after context?
- [ ] Are logs shipped off-box to a central store (SIEM/ELK) rather than kept only locally?
- [ ] Is that store append-only and access-controlled so an attacker cannot erase entries?
- [ ] Do you alert in near real time on brute force, credential stuffing, and enumeration patterns?
- [ ] Are alert thresholds tuned to catch slow, distributed attacks, not just bursts?
- [ ] Is there a documented incident-response process with owners and escalation?
- [ ] Are all clocks NTP-synced and timestamps in a consistent timezone (UTC/ISO 8601)?
- [ ] Do you encode untrusted data before logging it to prevent log injection/forging?
- [ ] Have you verified that passwords, tokens, and full PII never appear in logs?
- [ ] Is the health of the log pipeline itself monitored (so silent failures are caught)?
Key Takeaways
- Detection is a pipeline—generate, collect, detect, respond—and a break anywhere creates the vulnerability.
- Context makes a log useful: who, what, when, where, and outcome, in a consistent structured format.
- Centralise and protect logs; local, editable logs are neither reliable nor forensically sound.
- Alert on patterns, not just events, with thresholds tuned to catch slow and distributed attacks.
- Detection without response is theatre; every alert needs an owner and an escalation path.
- Log security context, never secrets; too much of the wrong data is its own breach.
Next Steps
- Attack Vectors: The attacker techniques that thrive on missing detection
- Prevention: Building a logging, monitoring, and response baseline
- Examples: Vulnerable vs. secure logging in Python, Node, and Java
- Hands-On Lab: Practice detecting attacks in a safe, isolated environment
Edition note: In the OWASP Top 10 2021 this category became A09:2021 – Security Logging and Monitoring Failures, broadened but conceptually the same. This lesson keeps the 2017 framing.