thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Intermediate

Log Injection

Writing unvalidated user input to logs, allowing forged entries, log parsing exploits or injection into log viewers.

Definition

Attackers inject newlines to create fake entries, insert markup that executes in web-based log viewers, or exploit vulnerable logging libraries (as with Log4Shell's lookup feature). Mitigations include encoding CR/LF and markup, structured logging (JSON) and keeping logging libraries patched.

Example

A username containing a newline adds a fake 'admin login succeeded' line to the audit log.

Exam tip

Log forging undermines non-repudiation; encode before logging.

Related terms