# CVE-2026-40106: Wazuh Agent heap overflow in syscheck registry wildcard expansion

Source: https://junglewise.ai/threats/cve-2026-40106-wazuh-agent-heap-overflow-in-syscheck-registry-wildcard-expansion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-17. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

CVE-2026-40106 · Severity: medium · CVSS 4.7 · Published 2026-07-17

Wazuh is a security platform used to monitor and protect computers from threats. A flaw in the Windows version of the Wazuh agent allows a standard user on a computer to crash the security software by creating a specially named registry key. This can be used to disable security monitoring on the device or potentially allow the user to gain full administrative control over the system.

Technologies: [Wazuh Agent](https://junglewise.ai/threats/technologies/wazuh-agent). Vendors: [Wazuh](https://junglewise.ai/threats/vendors/wazuh).

## Quick answers

**Is CVE-2026-40106 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40106 being exploited in the wild.

**How severe is CVE-2026-40106?** Medium severity, with a CVSS score of 4.7, published 17 July 2026.

**Which products and versions are affected?** Wazuh Agent >= 4.6.0, < 4.14.5.

**Is there a fix for CVE-2026-40106?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-40106 attacked?** It is attacked with local access, in an operating system.

**Am I affected by CVE-2026-40106?** Check whether you run Wazuh Agent at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A heap-based buffer overflow (CWE-122) exists in the syscheck component of the Wazuh agent for Windows within the w_expand_by_wildcard function in syscheck_op.c. The vulnerability occurs because the agent allocates a fixed 256-byte buffer (OS_SIZE_256) to store expanded registry paths but fails to validate the length of the resulting string when processing wildcards (* or ?). A local attacker with low privileges can create a registry subkey with the maximum allowed length (255 characters) in a monitored path, causing an out-of-bounds write during string concatenation. Because the agent runs with NT AUTHORITY\SYSTEM privileges, this can result in a Denial of Service (DoS) via process crash or potential Local Privilege Escalation (LPE). The issue is fixed in version 4.14.5.

## Affected products

- Wazuh Wazuh Agent >= 4.6.0, < 4.14.5

## Timeline

- 2026-07-16: advisory: GitHub Security Advisory GHSA-qvrc-pcfc-jhqc published
- 2026-07-17: disclosed: NVD publication date

## References

- [https://github.com/wazuh/wazuh/security/advisories/GHSA-qvrc-pcfc-jhqc](https://github.com/wazuh/wazuh/security/advisories/GHSA-qvrc-pcfc-jhqc)

## Related threats

- [Wazuh missing TLS hostname verification in fluent-forward module](https://junglewise.ai/threats/cve-2026-112339-wazuh-from-3-9-0-before-4-14-9-contains-a-missing-tls-hostname)
- [Wazuh GitHub module server-side request forgery in pagination](https://junglewise.ai/threats/cve-2026-112338-wazuh-from-4-3-0-before-4-14-9-contains-a-server-side-request)
- [Wazuh agent stack-based buffer overflow in snort-full log reader](https://junglewise.ai/threats/cve-2026-112335-wazuh-agent-from-1-0-0-before-4-14-9-contains-a-stack-based)
- [Wazuh Agent out-of-bounds write in wazuh-execd](https://junglewise.ai/threats/cve-2026-112334-wazuh-from-1-0-0-before-4-14-9-contains-an-out-of-bounds-write)
- [Wazuh remote code execution via SCA policy path validation](https://junglewise.ai/threats/cve-2026-74036-wazuh-from-4-3-0-before-4-14-8-contains-a-remote-code-execution)
