A critical remote code execution vulnerability has been identified in Samba file servers and classic domain controllers that use the check password script feature with the %u substitution token. When configured this way, Samba passes the client-supplied username directly to a shell script without sanitizing shell meta-characters, allowing a remote, unauthenticated attacker to inject arbitrary commands and achieve full system compromise.
Exploitation requires no credentials or user interaction — the primary prerequisite is a non-standard configuration where %u is used in the check password script and the samba-dcerpcd service is running as a system service. Organizations running Samba in this configuration, particularly on internet- or perimeter-exposed hosts, should audit their Samba configuration immediately, remove or sanitize the %u token from any check password script directives, and apply available vendor patches.

