Wazuh Log Collector Integer Underflow Local Privilege Escalation Vulnerability
The Wazuh log collector mishandles the multilines log format, leading to an integer underflow when processing user-supplied data. A local attacker who can inject logs could exploit this to escalate privileges and execute arbitrary code as root.
This vulnerability allows local attackers to escalate privileges on affected installations of Wazuh. Log Injection is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the multilines log format parser fails to validate the length of user-supplied data, causing an integer underflow before a memory write.
Impact
A local attacker could escalate privileges and execute arbitrary code as root, but log injection is required.
What the attacker needed
Local access; ability to inject logs
The fix
Wazuh has issued an update to correct this vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
An integer underflow is a programming mistake where a number is decreased below its minimum value, wrapping around to a huge number. Here, the log collector does not properly check the size of data it receives, so a crafted log entry can cause memory corruption. A local attacker who can inject logs could then run commands with the highest privileges (root).
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.