Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-119958 — Containerised differential lab and wire-level proof of concept for CVE-2026-119958, a Windows LDAP out-of-bounds write enabling unauthenticated remote code execution. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-119958
Dynamic Analysis (Sandboxing)Memory ForensicsExploitationWeb Application ExploitationFuzzingPenetration TestingLearning & EducationBinary ExploitationLabs & Practice
GitHubgooglesky/cve-2026-119958

CVE-2026-119958

211 day agoNot yet reviewed
Share

Containerised differential lab and wire-level proof of concept for CVE-2026-119958, a Windows LDAP out-of-bounds write enabling unauthenticated remote code execution.

View Repository

CVE-2026-119958 — Windows LDAP out-of-bounds write → remote code execution

CVECVE-2026-119958
ComponentWindows LDAP — Lightweight Directory Access Protocol (MSRC component tag Windows LDAP - Lightweight Directory Access Protocol)
AffectedWindows 10 1607 → Windows 11 26H2, Windows Server 2016 → 2025 (28 SKUs; see §6)
Fixed inNovember 2026 security update — KB5131291, KB5131085, KB5131096, KB5131090, KB5131087, KB5132061, KB5132043, KB5131080, KB5131077, KB5132059
CWECWE-787 Out-of-bounds Write
ImpactRemote code execution in the context of the LDAP service
VectorNetwork, unauthenticated, no user interaction — crafted LDAP calls to a listening LDAP service
TriggerThe length octets of a length-prefixed field in an LDAP message

Microsoft published the advisory on 2026-11-10 with the November 2026 security update. The flaw is an out-of-bounds write in the Windows LDAP component: an unauthenticated network attacker sends crafted LDAP calls to a listening LDAP service, and the service writes past the end of a fixed-capacity buffer. The advisory states that successful exploitation "could gain code execution through a specially crafted set of LDAP calls to execute arbitrary code within the context of the LDAP service". ZDI notes that the consequence is amplified by where the code lands — "it runs code in the LDAP service context, it could be quite destructive, especially on Domain Controllers."

Every domain controller exposes LDAP on TCP/389 (and TCP/636 for LDAPS) by design, and the service cannot be disabled without breaking domain operations. An attacker that reaches the LDAP port of a domain controller therefore lands in the trust boundary that every other domain resource relies on.

This repository contains a containerised laboratory that reproduces the defect end to end, a differential proof of concept, and the results of a sweep on the patched model.


1. Scope and fidelity of this laboratory

The Windows LDAP component is closed-source Microsoft code. None of its code or binaries are redistributed here, and the advisory discloses no root cause, no function name, no buffer size and no payload. What is reproducible here is therefore:

  • The vendor's own statement of the defect — CWE-787 out-of-bounds write, network vector, unauthenticated, no user interaction, code execution in the context of the LDAP service, CVSS 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), the exploitation state Exploitation Less Likely, and the affected/fixed version matrix — all taken verbatim from the MSRC advisory and the MSRC CVRF feed for release 2026-Nov.
  • The protocol the defect lives in — the LDAP v3 wire format of RFC 4511 as profiled by MS-ADTS, implemented from the public specifications.
  • The security-relevant behaviour — a service that decodes the requests a peer sends, and one target component: the routine that copies a peer-supplied octet string into a fixed-capacity buffer.

Everything the laboratory asserts about the vendor product is sourced from the advisory. Everything it asserts about the model is labelled as such. The model is the only thing that runs in the lab, and it is deliberately built so that the vulnerable and the patched behaviour differ in the target component alone.

The model lives in lab/src/ and is selected with an environment variable:

buildthe target componentbinaries
LDAP_BUILD=vulncopies the peer-supplied length without checking it against the capacity of the destinationldapd-vuln, ldapc-vuln, harness-vuln
LDAP_BUILD=fixedvalidates the length and refuses the valueldapd-fixed, ldapc-fixed, harness-fixed

Each build exists twice, once with the sanitizers and once without (LDAP_SANITIZER=1 selects the AddressSanitizer + UndefinedBehaviorSanitizer build).

The difference between the two sides is one hunk in one function, and it is reproduced verbatim in evidence/versions.txt:

--- a/ldapmodel.c
+++ b/ldapmodel.c
@@ -43,12 +43,19 @@
                       const uint8_t *src, size_t len)
 {
 	/*
-	 * The copy size is the length the peer asked for.  Nothing checks it
-	 * against the capacity of the destination buffer.
+	 * The patched implementation validates the peer-supplied length
+	 * against the capacity of the destination before copying.
 	 */
+	if (len > cap) {
+		if (!g_quiet)
+			fprintf(stderr,
+			        "ldap_copy_octets: refusing %zu bytes for a %zu byte buffer\n",
+			        len, cap);
+		return LDAP_PROTOCOL_ERROR;
+	}
+
 	memcpy(dst, src, len);
 	(void)c;
-	(void)cap;
 	return LDAP_SUCCESS;
 }

The patch itself is lab/fixes/ldap-fix-bounds-check.patch; the image build applies it to produce the patched tree.


2. Root cause

The target component is the routine that copies a decoded, length-prefixed field into a fixed-capacity buffer. In the model that is ldap_copy_octets() in lab/src/ldapmodel.c:

int ldap_copy_octets(struct ldap_conn *c, uint8_t *dst, size_t cap,
                      const uint8_t *src, size_t len)
{
	/*
	 * The copy size is the length the peer asked for.  Nothing checks it
	 * against the capacity of the destination buffer.
	 */
	memcpy(dst, src, len);
	(void)c;
	(void)cap;
	return LDAP_SUCCESS;
}

The length is taken from the wire — it is the BER length octets of the element that the peer sent — and it is used directly as the copy size. The capacity of the destination is known to the caller (cap) and is not consulted. A peer that announces a length larger than the capacity therefore writes past the end of the destination.

The destination of the primary copy site is the value buffer of a decode slot, and the dispatch pointer of the slot follows it in memory (lab/src/ldapmodel.h):

struct op_slot {
	uint8_t         val[LDAP_CAP];
	void          (*fn)(struct op *op);
};

LDAP_CAP is 1024, the capacity of the modelled buffer. It is larger than any length AD DS documents for the fields the model decodes — the AD DS maximum-limits documentation caps the distinguished name of a simple bind at 255 characters — so a value of that size is one no peer has any business sending. A value of 1032 bytes therefore does not stay inside val[]: it overwrites fn, the pointer the service calls to dispatch the request it has just decoded. The write is a write of attacker-chosen bytes at an attacker-chosen offset, over a pointer the service then calls — the out-of-bounds write and the code execution are the same event.

The other copy sites — the distinguished name of a search base, the name of a bind, a control value, an extended request value, the attribute values of a response — copy into dedicated fixed-capacity allocations and are the sites the sanitizer reports on directly.

The sanitizer report

evidence/check-vulnerable-asan-report.txt, from the vulnerable build:

==3==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000488 ...
WRITE of size 2048 at 0x619000000488 thread T0
    #0 ... in __interceptor_memcpy
    #1 ... in ldap_copy_octets /build/src/ldapmodel.c:49
    #2 ... in copy_filter_value /build/src/ldapmodel.c:204
    #3 ... in parse_filter /build/src/ldapmodel.c:271
    #4 ... in ldap_parse_search_request /build/src/ldapmodel.c:374
    #5 ... in handle_connection /build/src/ldapd.c:216

The write is 2048 bytes into a 1024-byte value buffer: "0 bytes to the right of 1032-byte region" — the region is the decode slot, whose value buffer is followed by the dispatch pointer.


3. Attack surface

The LDAP service listens on TCP/389. The defect is in the decoding of the requests, so it is reached before any authorization decision: the crafted calls need no credentials and no user interaction, which is what the CVSS vector (PR:N/UI:N) and the advisory's "unauthenticated attacker" state.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    594
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    376
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    326
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    323
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    321

Explore all tools

Browse our collection of tools

View all tools →