CVE-2016-4984
Medium · 4.7CVSS
4.7
EPSS
0.1%
Published
Jul 17, 2017
CISA due date
—
Cloudanix analysis
A setup script on some directory servers can briefly leave its encryption certificate readable by other users on the same machine, allowing those users to copy it.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Data Exposure
- Component
- Application
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in generate-server-cert.sh allows a local process to read the newly created TLS certificate file before chmod restricts its permissions.
Why it matters to the business
Attackers with local access on affected systems may obtain encryption material intended to protect LDAP traffic, increasing risk of credential or session interception on servers that rely on auto-generated certificates.
How an attack unfolds
An attacker with a local account monitors the file system for the temporary certificate file created by the script, opens a read handle during the window before chmod executes, and copies the certificate contents for later use in decrypting traffic or impersonating the server.
How to fix it
Replace or patch the generate-server-cert.sh script to create the certificate with restrictive permissions (0600) from the start, or manually enforce correct ownership and mode on any generated certificate and key files; upgrade to a version of openldap-servers that eliminates the race condition when available.
How to confirm the fix worked
After remediation, re-run the certificate generation process under load and verify that the resulting certificate file has mode 0600 and is owned by the appropriate service account before any other user can access it.
Typical attack path
- Obtain local shell access on a system running openldap-servers
- Trigger or wait for the generate-server-cert.sh script to execute (typically during package installation or configuration)
- Exploit the race window to open and read the certificate file before permissions are tightened
- Retain the certificate for offline use against LDAP TLS sessions
How to detect it
Search system logs and file-system audit trails around package installation or slapd startup times for unexpected reads of certificate files created by generate-server-cert.sh; examine process listings and file-access events for non-root processes accessing the certificate during its creation window.
What your security team should do
- Audit all systems running openldap-servers for the presence of the vulnerable generate-server-cert.sh script
- Apply vendor updates or manual permission hardening immediately on any host that still uses the script
- Scan for world-readable certificate or key files under /etc/openldap or similar paths
- Review LDAP server configurations to confirm they do not rely on auto-generated certificates created by the flawed script
The record
/usr/libexec/openldap/generate-server-cert.sh in openldap-servers sets weak permissions for the TLS certificate, which allows local users to obtain the TLS certificate by leveraging a race condition between the creation of the certificate, and the chmod to protect it.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-121230 Race condition in ANGLE in Google Chrome prior to 157.0.8103.38 allowed a remote attacker… CWE-362
- CVE-2026-121079 Race condition in V8 in Google Chrome prior to 157.0.8103.38 allowed a remote attacker to… CWE-362
- CVE-2026-121628 Bagisto before 2.3.16 and 2.4.x before 2.4.1 contains a race condition vulnerability in… CWE-362
- CVE-2026-121408 FreeRDP before 3.32.2 contains a use-after-free in the urbdrc USB redirection channel… CWE-362
- CVE-2026-58926 A Use-After-Free (UAF) vulnerability exists in the EVS HAL, allowing a privileged client… CWE-362
- CVE-2026-59042 In __pkvm_pages_to_ppages of mmu.c, there is a possible out-of-bounds write due to a race… CWE-362
- CVE-2026-59043 In arm_lpae_split_blk_unmap of io-pgtable-arm-common.c, there is a possible memory… CWE-362
- CVE-2026-59045 In multiple locations, there is a possible memory corruption due to a race condition. CWE-362