CVE-2026-14940
Received Received - Intake

Heap Buffer Overflow in 389 Directory Server

Vulnerability report for CVE-2026-14940, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-07

Last updated on: 2026-07-07

Assigner: Red Hat, Inc.

Description

A heap-buffer-overflow flaw was found in 389 Directory Server (389-ds-base). When normalizing a Distinguished Name (DN) that contains a legacy-quoted value encoding a multivalued nested Relative Distinguished Name (RDN), the server can write past the end of a heap allocation while sorting RDN attribute-value pairs. An unauthenticated remote attacker can trigger this condition by sending an LDAP operation whose DN reaches the DN normalization routine, such as a search with a crafted base DN. This can corrupt heap memory and may cause denial of service.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-07
Last Modified
2026-07-07
Generated
2026-07-07
AI Q&A
2026-07-07
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
redhat 389_directory_server 2.8.0-7.el9_8

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Compliance Impact

The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.

Executive Summary

CVE-2026-14940 is a heap-buffer-overflow vulnerability in the 389 Directory Server (389-ds-base) that occurs during the normalization of a Distinguished Name (DN). This happens when the DN contains a legacy-quoted value encoding a multivalued nested Relative Distinguished Name (RDN). Specifically, the vulnerability arises because the server improperly handles the closing quote of a nested attribute-value pair, which leads to stale pointers and overlapping data entries.

During the sorting of RDN attribute-value pairs, the server writes past the allocated heap memory, causing a heap-buffer-overflow. An unauthenticated remote attacker can trigger this flaw by sending an LDAP operation, such as a search with a specially crafted base DN, that reaches the DN normalization routine.

Impact Analysis

This vulnerability can lead to heap memory corruption, which may cause the 389 Directory Server to crash or become unavailable, resulting in a denial of service (DoS).

An unauthenticated remote attacker can exploit this issue, meaning no prior access or credentials are needed to trigger the flaw.

In some environments, the server may simply return an "Invalid DN syntax" error and continue running, but in others, especially with certain memory checking tools enabled, the server process may terminate unexpectedly.

Detection Guidance

This vulnerability can be detected by attempting to trigger the heap-buffer-overflow condition through LDAP operations that involve DN normalization, such as search operations with a crafted base Distinguished Name (DN) containing legacy-quoted values encoding multivalued nested Relative Distinguished Names (RDN).

In environments with AddressSanitizer (ASAN) or with the environment variable MALLOC_CHECK_=3 set, triggering the vulnerability causes the 389 Directory Server (ns-slapd) process to crash with a general protection fault, which can be used as an indicator.

A practical approach is to perform LDAP search commands with a specially crafted base DN designed to exercise the vulnerable DN normalization routine.

  • Use ldapsearch with a crafted base DN that includes legacy-quoted multivalued nested RDNs to test the server's response.
  • Set the environment variable MALLOC_CHECK_=3 before starting the 389 Directory Server to detect memory corruption crashes.
  • Monitor the ns-slapd process for crashes or general protection faults during these tests.
Mitigation Strategies

Immediate mitigation steps include updating the 389 Directory Server (389-ds-base) to a version that contains the fix for this heap-buffer-overflow vulnerability.

If an update is not immediately possible, consider restricting or filtering LDAP operations that involve DN normalization, such as limiting or blocking search requests with crafted base DNs from untrusted sources.

Additionally, running the server with memory corruption detection tools enabled (e.g., setting MALLOC_CHECK_=3) can help detect exploitation attempts early by causing the server to crash instead of continuing in a corrupted state.

Monitoring logs and system behavior for unusual LDAP errors or crashes can also help in early detection and response.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-14940. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart