- Home
- All questions
- Question 236
CompTIA Security+ study material · question 236 of 611
An attacker submits input containing newline characters that appear in the log as separate, forged entries. What is the defence?
Show the answer
Answer: C. Validating and encoding data before it is written to the log
Log injection destroys the log's value as evidence, and the fix is to treat log output like any other rendering context.
Source: OWASP Logging Cheat Sheet (OWASP) — OWASP Logging Cheat Sheet › Protect