From Patch to Exploit: Rebuilding CVE-2025-27740 in Active Directory

December 3, 2026
From Patch to Exploit: CVE-2025-27740 — certificate with a requester-chosen SKI used to authenticate as another account

By Daniel Delfino (Danners) | Faraday Red Team

A reverse engineering analysis of Windows Server 2025 uncovered how the Subject Key Identifier (SKI) could be manipulated, led to a working proof of concept and validated a certificate-based impersonation scenario.

By reverse engineering a Microsoft patch, we rebuilt a vulnerability in Active Directory Certificate Services (AD CS), developed a proof of concept and showed how a certificate with a manipulated identifier could be used to impersonate another identity.

TL;DR

A security update can close a vulnerability and, at the same time, leave clues about how it worked.

Following that trail, our Red Team, led by Daniel Delfino (a.k.a. Danners), analyzed a Microsoft patch for Active Directory Certificate Services (AD CS).

Instead of stopping at the CVE description, we compared the vulnerable and patched versions, rebuilt the flaw and took the hypothesis to a lab until we had a working proof of concept.

The result: we found that a certification authority (CA) could issue a certificate that kept a public key identifier chosen by the requester. Combined with a certificate mapping in Active Directory and a service that trusted that identifier, the team was able to authenticate as another account.

In other words: the user could influence a piece of data that other systems relied on to recognize an identity.

A known CVE: the starting point

On April 8, 2025, Microsoft published CVE-2025-27740, an elevation of privilege vulnerability in Active Directory Certificate Services (AD CS), classified as Weak Authentication (CWE-1390), with a CVSS score of 8.8.

For Windows Server 2025, the fix shipped in update KB5055523, build 26100.3775.

The official advisory described the risk, but did not explain in detail the mechanism we wanted to investigate.

Our goal was to go beyond the CVE description: identify the root cause, rebuild the vulnerable behavior and test its impact in a controlled environment.

To do that, we started with the patch itself.

Reverse engineering: what the patch revealed

We started with a familiar question: what exactly changed between the version before and after the patch?

Using Winbindex, we identified the relevant AD CS binaries and compared Windows Server 2025 builds before and after KB5055523.

Among the components we examined, certsrv.exe held the changes we were interested in.

Working from the executables and their symbols, we began with two basic tools: strings and radare2. A diff revealed three names that practically told the whole story:

  • MSG_I_CA_SKI_OVERRIDDEN
  • SKIRequested
  • SKIGenerated

The references led to a function related to public key properties: pkcsSetPublicKeyProperties.

Comparing the implementation before and after the patch, we found a significant difference.

The pre-patch binary contained a call to myCreateSubjectKeyIdentifierExtension; the patched version contained a second call.

The analysis showed that Microsoft had added new logic to regenerate the Subject Key Identifier (SKI) from the actual public key in the request, replacing the value supplied by the requester when needed.

That small difference in the execution flow revealed the core hypothesis: before the patch, the server could trust an SKI included in the certificate request, even if that identifier did not match the public key actually being certified.

Diagram of the certsrv.exe changes in KB5055523: before the patch the CA kept the SKI sent in the CSR; after the patch it always regenerates the SKI from the public key and logs MSG_I_CA_SKI_OVERRIDDEN.
Figure 1. What Microsoft changed in certsrv.exe (pkcsSetPublicKeyProperties) before and after KB5055523.

Why does a requester-chosen SKI matter so much?

To understand the impact of this behavior, we first need to look at what the Subject Key Identifier does.

In an X.509 certificate, the Subject Key Identifier is an extension used to identify a public key.

Active Directory also has the altSecurityIdentities attribute, which lets you explicitly map certificates to user accounts. One of the supported formats is X509:<SKI>…, which Microsoft considers a strong mapping type in its documentation on certificate-based authentication.

The problem appears when the trust relationship between the identifier and the public key breaks. If an authentication system uses the SKI as a trusted reference for identity, but the certification authority accepts an SKI supplied by an unprivileged user, the identifier no longer guarantees that the certificate belongs to the expected key.

The private key still belongs to the requester; what gets manipulated is the data another service uses to decide which account the certificate maps to.

The outcome of this scenario depends on how certificates are issued, which templates can be requested and which mapping mechanism the receiving service uses.

From hypothesis to PoC

With the root cause identified, we built a proof of concept (PoC) on top of Certipy.

Instead of reimplementing the whole enrollment protocol, we modified how the Certificate Signing Request (CSR) is built: we kept the normal issuance flow and added a SubjectKeyIdentifier extension with a controlled value. The rest of the request and issuance process used Certipy’s standard flow with AD CS.

In the lab, we set up a vulnerable Windows Server 2025 with Active Directory Certificate Services (AD CS) and an Enterprise CA.

The scenario included two identities:

  • rinoa: a low-privileged requesting account.
  • VictimAdmin: a privileged test account, configured with an explicit certificate mapping.

The first validation aimed to confirm one specific fact: whether the certification authority would issue a certificate whose SKI matched the value inserted in the CSR, even when it did not match the identifier derived from the requester’s public key.

The result

The certificate analysis showed the following:

SKI requested by rinoa = SKI issued by the CA: TRUE
Issued SKI = identifier derived from the actual public key: FALSE

The check confirmed the hypothesis. The certificate still belonged to rinoa in its identity fields, but it carried the SKI chosen to represent the test account.

On a patched server, the behavior was different: the certificate’s SKI was regenerated from the public key.

The first part of the hypothesis was confirmed.

But getting a certificate with a manipulated SKI did not, on its own, mean we had achieved privilege escalation.

We still needed to show how that certificate could affect a real authentication process.

From a manipulated certificate to identity impersonation

Having a certificate with a manipulated SKI does not automatically mean logging in as an administrator. Our first attempt was to use it with PKINIT, Kerberos certificate-based authentication.

We could not impersonate the victim in the lab: other identity data in the certificate, such as the UPN and the SID extension, were still tied to the requester.

So we took a different route: services that perform TLS client authentication through schannel and Active Directory certificate mapping.

We set up an IIS (Internet Information Services) environment with certificate authentication and checked a requirement that can decide the outcome: if the certificate includes a valid SAN UPN (Subject Alternative Name User Principal Name) and that mapping method is applied first, the service may map it to the requesting account instead of using the explicit SKI mapping.

To validate the SKI scenario, we used a client authentication template configured without enforcing SUBJECT_ALT_REQUIRE_UPN.

That condition matters when reading the result:

It should not be assumed that every standard template allows the attack to be reproduced with a low-privileged domain account. Exploitation depends on a specific combination of enrollment permissions, certificate properties and configuration of the consuming service.

The evidence

Authenticating against IIS with the certificate issued to rinoa, we got the following result:

LOGON_USER:    POC\victim
REMOTE_USER:   POC\victim
CERT_SUBJECT:  CN=Rinoa, CN=Users, DC=poc, DC=local

The difference between LOGON_USER and CERT_SUBJECT was the clearest evidence.

The certificate had been issued to rinoa, and the private key used belonged to that account. Yet the web service treated the connection as authenticated by POC\victim.

What we can show (and what we can’t)

An important part of the research was identifying not only what worked, but under which conditions.

The PoC showed that a vulnerable certification authority could issue a certificate that kept a requester-controlled SKI, and that this behavior could be used to impersonate an identity in services relying on explicit certificate mappings.

However, it does not show automatic escalation through PKINIT, nor that any user can exploit any AD CS deployment with a default template.

The real scope must be assessed based on patch level, enrollment permissions, available templates and the applications that consume certificates.

These conditions do not make the finding less important. Our analysis is precisely about identifying where the risk exists: both the mechanism that works and the limits we found in testing.

What can you check internally?

The first step is to verify that affected certification authorities have the relevant security updates installed.

For Windows Server 2025, KB5055523 (build 26100.3775) or a later cumulative update fixes the case analyzed here. For other affected versions, check the Microsoft updates associated with CVE-2025-27740.

Beyond patching, we recommend reviewing three areas of your environment:

1. Explicit certificate mappings

Inventory your use of altSecurityIdentities, especially X509:<SKI> mappings on sensitive accounts.

2. Templates and enrollment permissions

Identify which client authentication templates accept requests from low-privileged identities.

3. Services that use certificates for authentication

Check whether any IIS application or schannel-based service relies on those mappings, and in what order identities are resolved.

For detection teams, it is worth reviewing the AD CS log and certificate request and issuance events, as long as the relevant auditing is enabled.

The MSG_I_CA_SKI_OVERRIDDEN message is a useful lead for investigating requests with a replaced SKI on updated systems; its presence alone does not prove malicious activity.

From the patch to understanding the risk

The analysis of CVE-2025-27740 started with a difference between two versions of an executable and ended with a proof of concept that demonstrated a concrete identity impersonation scenario.

The process also showed the limits of exploitation: the same certificate can produce different results depending on the authentication mechanism and the environment’s configuration.

Researching a vulnerability means rebuilding how it works, testing hypotheses and understanding the conditions that make exploitation possible.

That knowledge lets you move from a general CVE description to a more precise understanding of the risk.

References

Continue Reading

The latest handpicked blog articles

Our Red Team reverse-engineered Microsoft's patch for CVE-2025-27740 in AD CS, rebuilt the flaw and developed a working proof of concept. See how a requester-chosen Subject Key Identifier (SKI) enabled

December 3, 2026

Argentina strengthens telecom cybersecurity with Disposition 7/2026, introducing new supply chain security requirements. Explore what changes, who is affected, and why supplier certification alone isn't enough to secure critical infrastructure.

November 19, 2026

A research log, told in the order it happened. We started by pulling on the October 2026 eMudhra CA compromise — and following where it actually reached, versus where everyone

November 15, 2026

Stay Informed, Subscribe to Our Newsletter

Enter your email and never miss timely alerts and security guidance from the experts at Faraday.

Faraday provides a smarter way for Large Enterprises, MSSPs, and Application Security Teams to get more from their existing security ecosystem.

Headquarters

Research Lab & Dev

Solutions

Open Source

© 2025 Faraday Security. All rights reserved.
Terms and Conditions | Privacy Policy