CVE-2024-22857: zlog · Heap-based Buffer Overflow
Affects zlogSource CVE Database V5
Not known to be exploited · CVSS 9.8 Critical.
Data as of 26 Oct 2026, 08:30 UTC
- EPSS
- 1.6% chance of exploitation in 30 days – higher than 76% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Mar 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubhardysimpson/zlogpkg:github/hardysimpson/zlogOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2024-22857, organizations should immediately identify all instances of the zlog library in their software stacks and verify the version in use. Upgrading to a patched version of zlog that addresses this buffer overflow vulnerability is the most effective mitigation. Employ runtime protections like Address Space Layout Randomization (ASLR), stack canaries, and heap protections to reduce exploitation success. Conduct thorough code audits and fuzz testing on components using zlog to detect similar issues. Network-level protections such as firewalls and intrusion detection systems should be tuned to detect anomalous behavior indicative of exploitation attempts. Finally, maintain robust incident response plans to quickly address any exploitation attempts and monitor threat intelligence feeds for emerging exploit code or indicators of compromise related to this vulnerability.
Description
Heap based buffer flow in zlog v1.1.0 to v1.2.17 in zlog_rule_new().The size of record_name is MAXLEN_PATH(1024) + 1 but file_path may have data upto MAXLEN_CFG_LINE(MAXLEN_PATH*4) + 1. So a check was missing in zlog_rule_new() while copying the record_name from file_path + 1 which caused the buffer overflow. An attacker can exploit this vulnerability to overwrite the zlog_record_fn record_func function pointer to get arbitrary code execution or potentially cause remote code execution (RCE).
References
- github.com/HardySimpson/zlog/ (opens in a new tab)
- github.com/HardySimpson/zlog/blob/1a7b1a6fb956b92a4079ccc91f30da21f34ca063/src/rule.h (opens in a new tab)
- cybersecurity-help.cz/vdb/SB2024022842 (opens in a new tab)
- github.com/HardySimpson/zlog/pull/251 (opens in a new tab)
- ebryx.com/blogs/arbitrary-code-execution-in-zlog-cve-2024-22857 (opens in a new tab)