Skip to content
Memory corruption Advisory Advanced CVE-2023-42463

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.

Keith Yeo Follow

Originally disclosed on Zero Day Initiative

High 7.4 View original

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.

Keith Yeo (@kyeojy), on the Zero Day Initiative

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.

More by Keith Yeo

View all

1 more disclosed report, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.