/

CVE-2026-41424

Severity:

HIGH RISK

(8.2)

Authorization Bypass (CWE-863) in Wazuh User API Endpoint

CVE-2026-41424

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-863

Impact:

Administrative Account Takeover

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A broken authorization check in Wazuh's user-management API can cause requests to be evaluated without the authenticated administrator's identity. An authenticated user with the users_admin role may overwrite passwords for protected administrator accounts, potentially gaining full administrative control.

Affected context

The vulnerability affects Wazuh deployments in which the security user update endpoint processes requests using the user value supplied in the request rather than the authenticated subject recorded in the access token. The issue becomes risky when an authenticated account has the users_admin role and protected administrator accounts use reserved user IDs at or below 99. The flaw is present in affected release ranges before the corresponding security fixes.

Exploit preconditions

  • Attack surface: Authenticated Wazuh API user-management endpoint
  • Required access: A valid authenticated account with the users_admin role
  • Trigger point: Updating a user through the security user update operation
  • Target condition: The target is a protected account using a reserved user ID at or below 99
  • Why exploitation is possible: The authorization logic receives a request-controlled user value instead of the authenticated token subject, and omission of the resulting null value prevents reserved-account protection from reliably identifying the requester

Why this happens

The underlying bug is an identity-confusion authorization failure. The API passes a user value derived from request data into authorization-related processing instead of consistently using the authenticated subject from the token context. A helper then removes the null value, preventing downstream reserved-account checks from receiving the identity they require. This maps to CWE-863, Improper Authorization, because access-control decisions can be made without reliably binding the operation to the authenticated principal.

Potential impact

  • An attacker may overwrite passwords for protected administrator accounts.
  • An attacker could take over the Wazuh superuser account.
  • An attacker may gain broad administrative control over Wazuh-managed security operations.
  • An attacker could alter monitoring, detection, response, or user-management settings.
  • An attacker could use administrative access to facilitate further compromise of connected systems.

General mitigation guidance

Mitigation generally focuses on binding every authorization decision to the authenticated identity from trusted token or session context rather than to request-supplied identity fields. Protected-account checks should fail closed when the authenticated subject is absent, malformed, or inconsistent, and reserved accounts should require explicit policy enforcement for sensitive operations. Secure-by-default patterns include centralized authorization, immutable identity context, strict role and object-level checks, and separate controls for password changes on highly privileged accounts. Administrative roles and API service permissions should follow least privilege, while sensitive account-management actions may also benefit from reauthentication, approval workflows, or stronger authentication controls.

How teams detect issues like this

Detection approaches can include static analysis and code review rules that flag authorization decisions based on request parameters instead of trusted authentication context. Reviewers can look for identity fields copied from request bodies, query parameters, or headers; helpers that silently remove missing identity values; and authorization checks that do not fail closed. API policy tests should verify that users cannot modify protected accounts unless the authenticated principal is explicitly authorized, including cases with missing, conflicting, or forged identity fields. Runtime monitoring can alert on password changes affecting reserved accounts, unusual users_admin activity, and administrative changes originating from unexpected sessions.

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/commit/1a38d11574c6d35a4272e1e7145d55d293e7dda4
github.comgithub.com/wazuh/wazuh/commit/813add3575ecd4df484b2326715ca78f65505b4e
github.comgithub.com/wazuh/wazuh/pull/35442
github.comgithub.com/wazuh/wazuh/pull/35469
github.comgithub.com/wazuh/wazuh/releases/tag/v4.10.4
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.6
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-gj9h-8hmr-xjjr

Frequently asked

questions

Exploitation generally requires an authenticated Wazuh account with the

users_admin role. Unauthenticated attackers would not normally satisfy the

endpoint's access requirements.

Protected administrator accounts using reserved user IDs at or below 99,

including the Wazuh superuser, may be affected when the vulnerable request

handling and authorization conditions are present.

Authorization decisions should use the authenticated subject from trusted

token context, reject missing or inconsistent identity data, and enforce

protected-account rules before allowing sensitive account changes.

Centralize authorization checks, prohibit request-controlled identity

substitution, test object-level permissions for privileged resources, and

monitor sensitive administrator-account changes.

Find out what's already
exploitable in your codebase.