Description
The ossec-analysisd's OS_CleanMSG function doesn't remove or encode terminal control characters or newlines from processed log messages. In many cases those control characters/newline are later logged.
There have been cases where allowing arbitrary control characters in log messages has led to command execution with specific terminal emulator implementations. As a result many pieces of software (e.g. Apache HTTPD) have added escaping of control characters in log messages. It may also be possible to abuse terminal control characters to hide previous messages in a log, tricking system administrators into missing events.
Similarly, because newlines (\n) are permitted in messages processed by ossec-analysisd it may be possible to inject nested events to the ossec log. This may result in system administrators being tricked into thinking alerts fired that did not.