{"id":"CVE-2026-45798","summary":"Wazuh: Pre-auth stack-buffer-overflow in compare_wazuh_versions reachable from wazuh-authd (TCP/1515) via crafted enrollment V: field","details":"Wazuh is a free and open source platform used for threat prevention, detection, and response. From 4.5.0 until 4.14.6 and 5.0.0-beta2, compare_wazuh_versions() in src/shared/version_op.c copies the attacker-controlled enrollment V: field into a 10-byte stack buffer with strncpy() but does not explicitly terminate the buffer. The function is reachable before authentication through wazuh-authd on TCP port 1515 when anonymous TLS enrollment is enabled. A version string of at least nine non-null bytes can cause strchr() and strtok() to read beyond ver2 and can make strtok() write a null byte into adjacent stack memory, allowing a remote denial of service. This issue is fixed in versions 4.14.6 and 5.0.0-beta2.","aliases":["GHSA-4fvp-jfc3-qr6r"],"modified":"2026-09-11T08:19:23.052654Z","published":"2026-08-19T16:20:54.636Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-121","CWE-170"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45798.json"},"references":[{"type":"WEB","url":"https://github.com/wazuh/wazuh/releases/tag/v4.14.6"},{"type":"WEB","url":"https://github.com/wazuh/wazuh/releases/tag/v5.0.0-beta2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45798.json"},{"type":"ADVISORY","url":"https://github.com/wazuh/wazuh/security/advisories/GHSA-4fvp-jfc3-qr6r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45798"},{"type":"FIX","url":"https://github.com/wazuh/wazuh/commit/b6aac379982d6144b8da38450cbea6c8dc15be44"},{"type":"FIX","url":"https://github.com/wazuh/wazuh/pull/36059"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/wazuh/wazuh","events":[{"introduced":"f6aba151d08ef065dfc1bdc9b8885c3d4f618fca"},{"introduced":"cddd833300cb5af494ba7dab31192bae649eb184"},{"fixed":"44c2925b46bd058d2426bd44ed1b3e5d7b7b03b4"},{"fixed":"b58b3b2552497639b1b2a2b23e8de87e4ce9cf02"},{"fixed":"b6aac379982d6144b8da38450cbea6c8dc15be44"}],"database_specific":{"source":["AFFECTED_FIELD","REFERENCES"],"extracted_events":[{"introduced":"4.5.0"},{"fixed":"4.14.6"},{"introduced":"5.0.0-beta1"},{"fixed":"5.0.0-beta2"}]}}],"versions":["v5.0.0-beta1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45798.json","vanir_signatures_modified":"2026-09-11T08:19:23Z","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/wazuh/wazuh/commit/b6aac379982d6144b8da38450cbea6c8dc15be44","target":{"file":"src/shared/version_op.c","function":"compare_wazuh_versions"},"deprecated":false,"digest":{"function_hash":"2079175732449232036843981731944730527","length":1258},"id":"CVE-2026-45798-76c40226","signature_type":"Function"},{"deprecated":false,"digest":{"line_hashes":["122026037465290344113324240173846478808","338384601497527746320452320953772889099","228988211458791195509067993470987929436","102276824146218444218473893962888976605","340004146909213435438188438060322461907","72488244560585228706078613549218987501","3661383373452054794879124119512613626","108233358188913406336558149455108926857"],"threshold":0.9},"id":"CVE-2026-45798-ad63120e","signature_type":"Line","signature_version":"v1","source":"https://github.com/wazuh/wazuh/commit/b6aac379982d6144b8da38450cbea6c8dc15be44","target":{"file":"src/shared/version_op.c"}}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}