{"id":"CVE-2024-22857","aliases":["EUVD-2024-20387","GHSA-6q5p-rp5c-wmph","OESA-2024-2213","OESA-2024-2214","OESA-2024-2215","OESA-2024-2318"],"status":"published","title":"zlog 1.2.16 has a heap-based buffer overflow in struct zlog_rule_s while creating a new rule that...","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).","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-11","score":0.01685,"percentile":0.77305,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-122"],"published":"2024-03-07T00:00:00Z","modified":"2026-08-18T01:18:37Z","fixes":[{"ecosystem":"openEuler:22.03-LTS-SP3","package":"zlog","fixed_in":["1.2.15-6.oe2203sp3"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP4","package":"zlog","fixed_in":["1.2.15-4.oe2003sp4"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP1","package":"zlog","fixed_in":["1.2.15-6.oe2203sp1"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS","package":"zlog","fixed_in":["1.2.15-6.oe2403"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP3","package":"zlog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.15-6.oe2203sp3"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP4","package":"zlog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.15-4.oe2003sp4"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP1","package":"zlog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.15-6.oe2203sp1"}]}]},{"source":"osv","ecosystem":"openEuler:24.03-LTS","package":"zlog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.15-6.oe2403"}]}]}],"products":[{"vendor":"zlog_project","product":"zlog"}],"references":[{"url":"https://github.com/HardySimpson/zlog/","tags":["x_transferred"]},{"url":"https://github.com/HardySimpson/zlog/blob/1a7b1a6fb956b92a4079ccc91f30da21f34ca063/src/rule.h#L30","tags":["x_transferred"]},{"url":"https://www.cybersecurity-help.cz/vdb/SB2024022842","tags":["x_transferred"]},{"url":"https://github.com/HardySimpson/zlog/pull/251","tags":["x_transferred"]},{"url":"https://www.ebryx.com/blogs/arbitrary-code-execution-in-zlog-cve-2024-22857","tags":["x_transferred"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22857","tags":["advisory"]},{"url":"https://github.com/HardySimpson/zlog"},{"url":"https://github.com/advisories/GHSA-6q5p-rp5c-wmph"},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2024-2213","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2024-2214","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2024-2215","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2024-2318","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2024-22857","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).","status":"published","published":"2024-03-07T00:00:00Z","modified":"2024-08-27T19:45:25.342Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-122"],"updated_at":"2026-11-02T14:34:00.254134Z"}],"euvd":[{"id":"EUVD-2024-20387","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).","status":"published","published":"2024-03-07T00:00:00Z","modified":"2024-08-27T19:45:25Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T00:56:09.903799Z"}],"ghsa":[{"id":"GHSA-6q5p-rp5c-wmph","title":"zlog 1.2.16 has a heap-based buffer overflow in struct zlog_rule_s while creating a new rule that...","description":"zlog 1.2.16 has a heap-based buffer overflow in struct zlog_rule_s while creating a new rule that is already defined in the provided configuration file. A regular user can achieve arbitrary code execution.","status":"published","published":"2024-03-07T03:30:40Z","modified":"2024-08-27T21:32:18Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-122"],"updated_at":"2026-11-02T14:58:06.582466Z"}],"nvd":[{"id":"CVE-2024-22857","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).","status":"published","published":"2024-03-07T01:15:52.64Z","modified":"2026-06-17T07:11:50.197Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-122"],"updated_at":"2026-11-02T14:09:39.488031Z"}],"osv":[{"id":"OESA-2024-2213","title":"zlog security update","description":"zlog is a reliable, high-performance, thread safe, flexible, clear-model, pure C logging library.\r\n\r\nSecurity Fix(es):\r\n\r\nHeap 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).(CVE-2024-22857)","status":"published","published":"2024-10-12T11:07:41Z","modified":"2026-08-18T01:18:37.139788176Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:41.595342Z"},{"id":"OESA-2024-2214","title":"zlog security update","description":"zlog is a reliable, high-performance, thread safe, flexible, clear-model, pure C logging library.\r\n\r\nSecurity Fix(es):\r\n\r\nHeap 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).(CVE-2024-22857)","status":"published","published":"2024-10-12T11:07:41Z","modified":"2026-08-18T01:18:37.129482773Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:41.595342Z"},{"id":"OESA-2024-2215","title":"zlog security update","description":"zlog is a reliable, high-performance, thread safe, flexible, clear-model, pure C logging library.\r\n\r\nSecurity Fix(es):\r\n\r\nHeap 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).(CVE-2024-22857)","status":"published","published":"2024-10-12T11:07:41Z","modified":"2026-08-18T01:17:34.150094683Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:41.595342Z"},{"id":"OESA-2024-2318","title":"zlog security update","description":"zlog is a reliable, high-performance, thread safe, flexible, clear-model, pure C logging library.\r\n\r\nSecurity Fix(es):\r\n\r\nHeap 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).(CVE-2024-22857)","status":"published","published":"2024-11-01T11:07:47Z","modified":"2026-08-18T01:17:37.318757296Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:41.595342Z"}]}}
