Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-54866 Overview
CVE-2025-54866 affects the Wazuh agent on Windows installations from version 4.3.0 up to but not including 4.13.0. The installer fails to apply a restrictive Access Control List (ACL) to C:\Program Files (x86)\ossec-agent\authd.pass. Any account in the Authenticated Users group on the local machine can read the file and recover the enrollment password used to register agents with the Wazuh manager. The flaw is classified under CWE-276: Incorrect Default Permissions. Wazuh addressed the issue in release 4.13.0 by extending the installer logic that already stripped Authenticated Users from ossec.conf and client.keys.
Critical Impact
A local, authenticated user on a Windows endpoint running a vulnerable Wazuh agent can read the agent enrollment password and reuse it to register rogue agents against the Wazuh manager.
Affected Products
- Wazuh agent for Windows, versions 4.3.0 through 4.12.x
- Wazuh deployments using password-based agent enrollment (authd.pass)
- Fixed in Wazuh 4.13.0
Discovery Timeline
- 2025-11-21 - CVE-2025-54866 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2025-54866
Vulnerability Analysis
The Wazuh Windows installer creates authd.pass inside the agent installation directory to hold the shared enrollment secret used by agent-auth when registering with the Wazuh manager. The installer previously removed the Authenticated Users group (SID S-1-5-11) from ossec.conf and client.keys, but did not perform the same action for authd.pass. As a result, the file inherited permissions from the parent folder and remained readable by every interactive user on the host.
Any low-privileged local account can open the file and extract the plaintext enrollment password. That password permits an attacker to register an attacker-controlled agent against the Wazuh manager, potentially spoofing telemetry, exhausting enrollment slots, or establishing an unauthorized monitoring foothold under a chosen agent identity.
Root Cause
The installer script src/win32/InstallerScripts.vbs executed icacls ... /remove *S-1-5-11 for ossec.conf and client.keys but omitted an equivalent call for authd.pass. The file therefore inherited the broad read access granted to the Authenticated Users group on C:\Program Files (x86)\ossec-agent.
Attack Vector
Exploitation requires local access with a standard authenticated user context on the Windows host. The attacker reads C:\Program Files (x86)\ossec-agent\authd.pass, extracts the enrollment password, and uses it against the Wazuh manager's enrollment service to register an arbitrary agent.
grantAuthenticatedUsersPermFolder = "icacls """ & install_dir & """ /grant *S-1-5-11:RX"
WshShell.run grantAuthenticatedUsersPermFolder, 0, True
- ' Remove Authenticated Users group for ossec.conf, last-ossec.conf and client.key
+ ' Remove Authenticated Users group for ossec.conf, last-ossec.conf, client.keys and authd.pass
remAuthenticatedUsersPermsConf = "icacls """ & home_dir & "*ossec.conf" & """ /remove *S-1-5-11 /q"
WshShell.run remAuthenticatedUsersPermsConf, 0, True
remAuthenticatedUsersPermsKeys = "icacls """ & home_dir & "client.keys" & """ /remove *S-1-5-11 /q"
WshShell.run remAuthenticatedUsersPermsKeys, 0, True
+ remAuthenticatedUsersPermsAuthd = "icacls """ & home_dir & "authd.pass" & """ /remove *S-1-5-11 /q"
+ WshShell.run remAuthenticatedUsersPermsAuthd, 0, True
+
' Remove the Authenticated Users group from the tmp directory to avoid
' inherited permissions on client.keys and ossec.conf when using win32ui.
remAuthenticatedUsersPermsTmpDir = "icacls """ & home_dir & "tmp" & """ /remove:g *S-1-5-11 /q"
Source: Wazuh commit 606f19e - the patch adds the missing icacls call to strip Authenticated Users from authd.pass.
Detection Methods for CVE-2025-54866
Indicators of Compromise
- Presence of C:\Program Files (x86)\ossec-agent\authd.pass whose ACL still includes the BUILTIN\Authenticated Users principal with read rights.
- New or unexpected agents enrolled against the Wazuh manager with hostnames or IPs that do not match sanctioned deployment inventory.
- File read access events on authd.pass by processes or users unrelated to the Wazuh service account.
Detection Strategies
- Run icacls "C:\Program Files (x86)\ossec-agent\authd.pass" across the fleet and flag hosts where *S-1-5-11 or Authenticated Users appears in the output.
- Enable Windows object access auditing (Event ID 4663) on authd.pass and alert on reads from non-service accounts.
- Correlate Wazuh manager enrollment logs with endpoint inventory to identify agent registrations that lack an authorized change ticket.
Monitoring Recommendations
- Monitor the Wazuh agent installation directory for ACL drift after upgrades or repairs.
- Alert on manual edits to authd.pass or copies of the file to user-writable locations such as %TEMP% or network shares.
- Track the installed Wazuh agent version across the fleet and prioritize hosts still running 4.3.0 through 4.12.x.
How to Mitigate CVE-2025-54866
Immediate Actions Required
- Upgrade all Windows Wazuh agents to version 4.13.0 or later, which applies the corrected ACL during installation and upgrade.
- Rotate the shared enrollment password configured in authd.pass on both agents and the manager after patching.
- Audit the Wazuh manager for unauthorized agent registrations and remove any entries that cannot be tied to a legitimate asset.
Patch Information
The fix is included in Wazuh 4.13.0 via pull request #31187 and tracked under security advisory GHSA-mvfx-ph7m-qm37. The installer now runs an additional icacls command that removes the Authenticated Users SID from authd.pass.
Workarounds
- On hosts that cannot be upgraded immediately, manually restrict the file with icacls "C:\Program Files (x86)\ossec-agent\authd.pass" /remove *S-1-5-11 /q.
- Remove authd.pass from endpoints after enrollment completes if the deployment workflow does not require re-enrollment.
- Use certificate-based agent enrollment instead of password-based enrollment where supported, eliminating the shared secret entirely.
# Verify and remediate the ACL on a Windows host
icacls "C:\Program Files (x86)\ossec-agent\authd.pass"
icacls "C:\Program Files (x86)\ossec-agent\authd.pass" /remove *S-1-5-11 /q
icacls "C:\Program Files (x86)\ossec-agent\authd.pass"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

