Command Injection in 389 Directory Server Cockpit Console
A command injection vulnerability in the 389 Directory Server Cockpit console allows authenticated users with entry-creation privileges to achieve root-level command execution via crafted LDAP distinguished names.
CVE search metadata
CVE search record: CVE-2026-19843. Severity: high. CVSS: 8.4. KEV: no. Product: 389 Directory Server. Brief: Command Injection in 389 Directory Server Cockpit Console. Brief link: https://feed.craftedsignal.io/briefs/2026-09-07-cve-2026-19843/
CVE-2026-19843 describes a critical command injection vulnerability in the 389 Directory Server's Cockpit 389 Console. The flaw stems from improper sanitization of LDAP entry distinguished names (DNs) when the console constructs and executes ldapsearch commands. An attacker who has been delegated the authority to create or rename entries within the LDAP directory can inject arbitrary shell metacharacters into an entry's DN. When an administrator later logs into the Cockpit 389 Console and navigates to the view containing the malicious entry, the console's background process triggers the injection. Because the Cockpit 389 process operates with elevated permissions, the resulting command execution occurs with root privileges on the directory server host. This vulnerability effectively allows an attacker with low-level administrative access to escalate privileges to full system compromise.
Attack Chain
- Attacker obtains delegated LDAP write permissions for the target directory instance.
- Attacker crafts a malicious Distinguished Name (DN) containing shell metacharacters such as backticks, semicolons, or pipe operators.
- Attacker uses LDAP administrative tools to create or rename an existing entry using the crafted malicious DN.
- Attacker waits for a system administrator to open the 389 Directory Server instance in the Cockpit 389 Console.
- The console interface iterates through directory entries and automatically executes a backend
ldapsearchcall using the malicious DN string. - The underlying shell interprets the injected metacharacters within the
ldapsearchcommand string. - The system executes the injected payload as root, granting the attacker arbitrary code execution on the directory server host.
Impact
Successful exploitation results in full system compromise of the 389 Directory Server host, as the injected commands execute with root-level privileges. This enables attackers to exfiltrate the entire directory database, modify security credentials, install backdoors, or facilitate lateral movement within the network. The scope of impact is limited to organizations deploying 389 Directory Server with the Cockpit 389 Console management interface enabled.
Recommendation
- Audit existing LDAP entries for suspicious characters or unusually long strings in the 'distinguishedName' attribute using standard administrative tools.
- Implement strict input validation on LDAP entry naming conventions to prevent the insertion of shell metacharacters.
- Restrict delegation of entry creation or renaming privileges to a strictly controlled, minimal set of trusted users.
- Upgrade 389 Directory Server and Cockpit 389 components to the patched version once released by the vendor.
- Monitor host process-creation logs for
ldapsearchexecutions spawned by the Cockpit management user or web server process that contain suspicious shell arguments.
Immediate actions
Restrict LDAP entry modification privileges for non-essential accounts
Threat Hunt
Search for shell metacharacters in LDAP directory DN attributes
Data: LDAP database entry dumps
Mitigations
Upgrade 389-ds-base and Cockpit 389 once the vendor patch is available
CVE-2026-19843