Security logging and alerting failures: when nobody notices the attack
Security logging and alerting failures are the gaps that let an attack or a breach run unseen: events that were never recorded, records nobody reads, alerts that never fire. It is A09 in the OWASP Top 10:2025. A request filter can contribute one stream of events to the answer, and the rest of the work is done inside the application.
Quick facts
- Category
- A09:2025 Security Logging and Alerting Failures, in ninth place for the second edition running
- Earlier name
- A09:2021 Security Logging and Monitoring Failures; the 2025 edition changed the name to stress alerting
- Mapped weaknesses
- 5 CWEs: CWE-117 improper output neutralization for logs, CWE-221 information loss of omission, CWE-223 omission of security-relevant information, CWE-532 sensitive information in a log file, CWE-778 insufficient logging
- Known vulnerabilities
- 723 CVEs in OWASP's data, 260,288 occurrences; the average incidence rate is 3.91% and the maximum 11.33%
- Does a WAF stop it?
- No. This is a gap in visibility, not an attack in a request. A WAF's flagged-request record is one useful input; it replaces neither the application's logging nor its alerting
Figures are from the A09:2025 page; the earlier name is on the A09:2021 page. OWASP notes that the category is hard to test for and under-represented in the data it collects, so the numbers understate how much it matters.
What the category covers
People still search for this as OWASP logging and monitoring failures, the 2021 name. The change of word is the point: a record nobody monitors is only storage, and OWASP now puts the alert next to the log. A09 lists the ways the chain breaks.
- Auditable events are missing. Logins, failed logins and high-value transactions are not logged, or only some of them are.
- Errors say nothing useful. Warnings and errors produce no message, an unclear one, or one too thin to act on.
- Logs are not protected. They sit only on the machine that wrote them, are not backed up, or can be altered by whoever broke in.
- Nobody is watching. Alert thresholds and escalation paths are absent or do not work.
- The wrong data is logged. Personal or health data ends up in the log, or log data is not encoded and can be used to inject content into the logging system.
- Playbooks are missing or stale. And where alerts exist, false positives can bury the team that receives them.
OWASP's examples are about time rather than technique. In one, a breach of more than 3.5 million children's health records went undetected because nothing was logged or monitored, and may have been running for more than seven years. In another, a third-party cloud host notified an airline of a breach only after a delay. The attack worked the same way in each case; what differed was how long it went unseen.
What to log
The OWASP Logging Cheat Sheet names application code as the primary source of events, since it holds the most context about the user and the action. Its list of events to record, where possible, includes:
- Failures at the door. Input validation failures, authentication successes and failures, access control failures and session management failures such as a modified session ID.
- Errors and system events. Runtime errors, connectivity and third-party failures, configuration changes, and startups and shutdowns of the application and of logging itself.
- Higher-risk actions. Privilege changes, use of administrative or break-glass accounts, access to sensitive data, data export, file uploads, deserialisation failures and requests with unexpected HTTP verbs.
- Business logic that makes no sense. Steps out of order, or limits exceeded.
A09 adds two points about form. Log every security control, whether it succeeds or fails, and keep the user context needed to recognise a suspicious account. And write records in a format that log management tools can parse; the cheat sheet prefers structured formats such as JSON to free text.
The cheat sheet treats a failed input check as suspicious, not as proof of an attack. Severity comes from repetition, correlation and the context of the request. One malformed value is noise; the same account failing a hundred times is not.
What must never be logged
Over-logging is the other half of CWE-532, insertion of sensitive information into a log file. A09 names personal data and health data in particular. The cheat sheet's list of data to remove, mask, hash or encrypt before it reaches a log is longer:
- Credentials and secrets. Passwords, access tokens, encryption keys, database connection strings and session identifiers. A hashed session value may be used to correlate events.
- Regulated data. Payment cardholder data, bank account details, sensitive personal data and anything the user has not consented to or that is unlawful to collect.
- Internals. Application source code, and data above the classification the logging system is allowed to hold.
File paths, internal network names and addresses, and ordinary personal data such as names, phone numbers and email addresses need special care rather than automatic exclusion. The same sheet advises against dropping events from known users such as monitors or auditors; label them instead.
From log to alert
A log answers questions after someone asks them. An alert asks them on your behalf. The cheat sheet's guidance is to feed application logs into a central log management system, make events available to the right teams, notify them at once for serious events, and connect monitoring to incident response. It adds a check that is easy to forget: detect when logging itself has stopped, or when logs have been tampered with or read without authorisation.
A09 asks for more than thresholds. Build alert use cases with playbooks, so that the person paged knows what the alert means and what to do next. It also suggests honeytokens, decoy credentials or data that nothing legitimate touches, which produce alerts with almost no false positives. Where alerts drive automatic action such as account lockout, the cheat sheet warns that an attacker must not be able to turn the response into a denial of service against other users.
Repeated failures against one account, or failures arriving from many addresses, are signs of credential attacks; see authentication failures and brute force attacks. What happens after the alert is the subject of incident response with a filter in front. A09 recommends a written plan, such as one built on NIST SP 800-61, and training developers to recognise and report attacks.
Logs are a target too
CWE-117 is the first of the five weaknesses: improper output neutralisation for logs. If a line break in a user-supplied value reaches the log unchanged, an attacker can write a fake entry. The same family of mistake appears in HTTP headers as CRLF injection. The cheat sheet's answer is to neutralise carriage returns, line feeds and delimiters, encode for the output format, limit the length of user input in a message, and keep logging failures from stopping or leaking from the application.
The sheet also lists what an attacker can do to a log: forge or corrupt entries, harvest secrets from it, flood it to exhaust disk space, or damage it to hide their tracks. The countermeasures follow from the list. Detect tampering, restrict and monitor access to logs, move records to read-only storage as soon as practical, and ship them off the machine that produced them. A09 asks for an audit trail with integrity controls, such as append-only storage, on every transaction. Time matters as well: the sheet says to synchronise clocks across servers and to record both the event time and the logging time, because correlating events across systems depends on it.
Where a WAF helps and where it does not
Bridge WAF's activity log records the requests that filtering flagged, with the rule that matched and what happened to the request. Flagged requests reach it in batches, near real time. That makes it a stream of events about hostile-looking traffic that your application may never see, because the request was refused first, or may see but not recognise.
- It helps with the front of the chain. Probing, injection attempts and scanner traffic show up as flagged requests even when the application logged nothing. That is evidence for an investigation and a reason to look closer at a route.
- It does not replace application logs. The filter sees the request, not what the application did with it. A successful login, an access control decision, a changed record or a privilege change happens behind the filter. Whether a stolen password was used is a fact about your application.
- It holds flagged requests only. Unflagged traffic is absent, so it is not a record of everything that happened and cannot size an attack.
- It is not an alerting system. It is a record to read, not a SIEM and not a pager. Alert thresholds, escalation and playbooks stay yours. If you need its entries in your central log, check how long the record is kept and copy what you need before you need it.
- It describes requests, which can carry personal data. Treat anything you export from it with the same care as any other log.
Start in monitor mode. Every match is recorded and every request is still served, which is enough to see what the filter would flag on your own traffic before it refuses anything. Entries read best alongside your application's own logs, because the pair shows a request and its outcome, and the filter's record alone shows only the first half. Reading them for the first time, expect some legitimate traffic among them; false positives explains how to sort it.
The neighbouring category has the same split: for security misconfiguration a filter sees only the probing, and the setting stays in your hands. Here it sees only part of the evidence, and the remaining evidence is yours to collect.
What fixes it
OWASP's prevention list for A09 reads as a checklist for an engineering team.
- Log failures with context. Login, access control and server-side input validation failures, with enough user context to spot suspicious accounts, kept long enough for delayed forensic work.
- Log in a parseable format and encode it. So that tools can read it and log data cannot inject into them.
- Protect the record. Audit trails with integrity controls, such as append-only storage, for every transaction.
- Fail closed. Transactions that error are rolled back and retried.
- Alert on suspicious behaviour, with playbooks. And give developers guidance on how to raise alerts.
- Prepare to respond. An incident response and recovery plan, with developers trained to report attacks.
A09 also mentions the OWASP Core Rule Set among the tools that can feed such a pipeline. A rule set refuses requests; deciding which of its matches deserve a person's attention is still your job.
Questions
What are security logging and alerting failures?
They are the gaps that let attacks go unnoticed: security events that are not logged, logs that nobody monitors, and alerts or playbooks that are missing. OWASP ranks them ninth in the Top 10:2025, as A09.
Is OWASP logging and monitoring failures the same category?
Yes. A09:2021 was called Security Logging and Monitoring Failures. The 2025 edition kept the position and renamed it Security Logging and Alerting Failures to put the emphasis on alerts.
What should never be written to a log?
Passwords, access tokens, session identifiers, encryption keys, database connection strings, payment card data and other sensitive personal data. The OWASP Logging Cheat Sheet says to remove, mask, hash or encrypt them before logging, and it treats ordinary personal data such as names and email addresses with special care.
Can a WAF activity log replace application logging?
No. The activity log holds requests that filtering flagged. It does not show what the application did with the traffic that was not flagged, and it does not raise alerts. Keep application logging and alerting in place, and use the flagged-request record as an additional input.
Is the WAF activity log a SIEM?
No. It is a record of flagged requests that you read, not a system that correlates events from many sources or pages anyone. If you want those entries in a SIEM, you collect them there yourself.