Join our Newsletter — 33% off our NHI Course
Home› Guides› AD CS ESC1 to ESC16 Reference: Find and…
Guide Identity & Access Management (IAM)

AD CS ESC1 to ESC16 Reference: Find and Fix Every Certificate Services Misconfiguration

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 18 November 2026 16 min read
On this page

The ESC numbers are a shared catalogue of Active Directory Certificate Services (AD CS) misconfigurations, and each one has a specific setting you can check and a specific fix you can apply. This reference walks through ESC1 to ESC16 from the defender's side: what condition makes each one possible, where to look for it, and how to close it. It deliberately contains no exploitation steps or tool commands.

AD CS issues the certificates that users, computers and services use to prove who they are. When a template, an access control list, a CA flag or a domain controller registry value is set loosely, a low-privileged identity can obtain a certificate that authenticates as someone far more powerful, often a domain administrator. Because a certificate keeps working after a password reset, these weaknesses also matter for persistence. Many of the identities involved are non-human: computer accounts, service accounts, web enrollment servers and the CA itself.

For the broader picture of running AD CS safely, see the AD CS Security Guide. This page is the per-ESC remediation reference that sits beside it.

Key takeaways

  • The catalogue began with ESC1 to ESC8 in the SpecterOps research Certified Pre-Owned (June 2021). Later research added ESC9 onwards, and the Certipy wiki now documents the set in one place.
  • The ESCs fall into five groups: template settings, access control on PKI objects, CA-wide flags, enrollment endpoints, and how domain controllers map certificates to accounts.
  • Several ESCs share one root fix. Strong certificate binding on domain controllers (Microsoft KB5014754) and the SID security extension in issued certificates blunt ESC6, ESC9, ESC10, ESC14 and ESC16.
  • Some ESCs are invisible to common scanners. ESC5, ESC10, ESC12 and ESC14 need manual or scripted review.
  • Disabling templates nobody uses is the cheapest fix in the catalogue and appears in the mitigation list for most template ESCs.

How the ESC catalogue is organised

The original eight ESCs were named in Certified Pre-Owned by Will Schroeder and Lee Christensen. The SpecterOps post lists them as misconfigured certificate templates (ESC1), Any Purpose or no EKU templates (ESC2), enrollment agent templates (ESC3), vulnerable certificate template access control (ESC4), vulnerable PKI object access control (ESC5), EDITF_ATTRIBUTESUBJECTALTNAME2 (ESC6), vulnerable CA access control (ESC7) and NTLM relay to AD CS HTTP endpoints (ESC8). The whitepaper paired each with defensive guidance tagged with PREVENT and DETECT identifiers.

The numbering has kept growing. The Certipy wiki introduction refers to ESC1 through ESC17; this page covers the sixteen that have published defensive checks in that source. Treat the number as a label, not a severity ranking. ESC1 and ESC8 are among the most commonly found in real estates, while ESC12 depends on a specific hardware module.

ESCShort nameWhere the fix lives
ESC1Enrollee supplies subject on an authentication templateCertificate template
ESC2Any Purpose or no EKUCertificate template
ESC3Enrollment agent abuseCertificate template
ESC4Writable template ACLsTemplate object in AD
ESC5Weak ACLs on PKI objectsConfiguration naming context
ESC6EDITF_ATTRIBUTESUBJECTALTNAME2 on the CACA policy module
ESC7ManageCA or ManageCertificates held by non-adminsCA security
ESC8NTLM relay to HTTP enrollmentIIS on enrollment servers
ESC9Template omits the SID security extensionTemplate and domain controllers
ESC10Weak Schannel UPN mappingDomain controller registry
ESC11RPC request encryption not enforcedCA registry
ESC12YubiHSM2 software weaknessCA host and HSM stack
ESC13Issuance policy linked to a groupOID objects and templates
ESC14Weak explicit certificate mappingsaltSecurityIdentities on accounts
ESC15Application policy injection in schema version 1 templates (CVE-2024-49019)CA patch level and templates
ESC16SID extension disabled CA-wideCA policy module

Template misconfigurations: ESC1, ESC2 and ESC3

ESC1: enrollee supplies the subject

Condition. A template lets the requester state whose identity the certificate is for, includes an authentication EKU, is enrollable by a broad group and has no approval or signature gate.

Check. Look for CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT in the template name flags, combined with an authentication EKU (Client Authentication, Smart Card Logon, PKINIT Client Authentication or Any Purpose), Enroll rights for Domain Users or Authenticated Users, CA certificate manager approval turned off and authorised signatures set to zero. All five conditions together make the template dangerous.

Fix. Build the subject from Active Directory rather than from the request. Where a business process genuinely needs a supplied subject (some web server templates do), restrict Enroll rights to a small group, require manager approval and require authorised signatures. Disable the template if nothing uses it.

ESC2: Any Purpose or no EKU

Condition. A template has the Any Purpose EKU (2.5.29.37.0) or no EKU at all, and low-privileged users can enrol. Such a certificate can be used for client authentication and other purposes the template owner never intended.

Check. Review the EKU list on every published template and flag empty lists and Any Purpose. Note schema version 1 templates that could act as targets for enrollment agents.

Fix. Replace Any Purpose with explicit EKUs, restrict enrollment, require manager approval and move any agent-target templates to schema version 2 or later with application policy requirements.

ESC3: enrollment agent templates

Condition. An enrollable template grants the Certificate Request Agent EKU (1.3.6.1.4.1.311.20.2.1), and another template lets agents enrol on behalf of other users.

Check. Find templates carrying the Certificate Request Agent EKU and list who can enrol. Then check the schema version of templates an agent could target: version 1 templates lack agent restrictions.

Fix. Limit agent-template enrollment to a dedicated, monitored group. Use schema version 2 or later targets with application policy restrictions for agents, enable manager approval and configure enrollment agent restrictions on the CA so agents can only enrol for the populations they serve.

Access control on templates, PKI objects and the CA: ESC4, ESC5 and ESC7

ESC4: writable templates

Condition. A non-administrative principal holds write-level control over a template object in AD. Anyone who can rewrite a template can turn it into an ESC1 template.

Check. Review ACLs on objects under CN=Certificate Templates,CN=Public Key Services in the Configuration partition. Flag FullControl, WriteDACL, WriteOwner and WriteProperty on attributes such as msPKI-Enrollment-Flag, msPKI-Certificate-Name-Flag, pKIExtendedKeyUsage and nTSecurityDescriptor. Graph tools such as BloodHound and assessment tools such as PingCastle report these paths.

Fix. Restrict template write rights to a tightly held PKI administration group or Enterprise Admins. Watch for inherited rights and for service accounts that were given broad rights during a past migration.

ESC5: PKI objects in the Configuration partition

Condition. Weak ACLs on other PKI objects: the NTAuthCertificates object, AIA and CDP containers, the Certificate Templates and Certification Authorities containers, OID policy objects and key recovery agent objects. Control over these lets an attacker add a trusted CA or create new templates. The CA server's own computer object and local administrators also fall into this tier.

Check. The Certipy wiki notes that Certipy does not detect ESC5, so review these ACLs with BloodHound, PowerShell or ADSIEdit.

Fix. Apply least privilege and put the CA servers in the same administrative tier as domain controllers. Any principal that can administer a CA host can, in practice, issue any certificate.

ESC7: dangerous CA permissions

Condition. Non-administrative principals hold ManageCA (CA administrator) or ManageCertificates (certificate officer) rights on the CA.

Check. List the CA's access rights and owner. Check which templates are published, including SubCA, which is normally enrollable only by administrators.

Fix. Restrict CA administration to a dedicated group, separate the officer role from the administrator role, confirm that sensitive templates such as SubCA are not published to broad groups, and audit the CA ACL on a schedule.

CA-wide settings: ESC6, ESC11 and ESC16

ESC6: EDITF_ATTRIBUTESUBJECTALTNAME2

Condition. The EDITF_ATTRIBUTESUBJECTALTNAME2 flag is set on the CA policy module, letting requesters add a subject alternative name to a request for any template the CA issues. This turns every authentication template into a potential ESC1.

Check. Read EditFlags under the CA's policy module registry key. Whether the flag is directly exploitable depends on the May 2022 updates (KB5014754, which addresses CVE-2022-26923 among others), the domain controllers' binding mode and whether the SID security extension is present.

Fix. Remove the flag and restart the certificate service. Then confirm the change took effect. The flag is sometimes set by old build documents, so check that the setting stays off after CA rebuilds.

ESC11: unencrypted RPC requests

Condition. The CA's ICPR RPC interface accepts request traffic without encryption, which allows relayed requests.

Check. Look for IF_ENFORCEENCRYPTICERTREQUEST in InterfaceFlags under HKLM\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\<CA-Name>. If it is absent, ESC11 is open.

Fix. Set the flag, restart Certificate Services and verify the value afterwards. Test with any older clients first.

ESC16: SID extension disabled across the CA

Condition. The CA leaves the SID security extension (OID 1.3.6.1.4.1.311.25.2) out of every certificate it issues. A CA that has never received the KB5014754 update cannot add the extension at all.

Check. Look for that OID in policy\DisableExtensionList under the CA's policy module configuration, check the CA patch level and check the binding mode on domain controllers.

Fix. Remove the OID from the disable list, patch the CA and make sure domain controllers are in full enforcement.

Enrollment endpoints and relay: ESC8

Condition. Web Enrollment (/certsrv/), the Certificate Enrollment Web Service or the Certificate Enrollment Policy Web Service accepts NTLM, and either HTTP is enabled or HTTPS does not require Extended Protection for Authentication (EPA). An attacker who can coerce a privileged machine, such as a domain controller, into authenticating can relay that authentication and receive a certificate for the machine. See the NTLM Relay Guide for the wider relay problem.

Check. Inventory every server with web enrollment roles. On each IIS site, check for HTTP bindings, EPA status and whether NTLM is enabled.

Fix. Set EPA to Required, serve HTTPS only and remove HTTP bindings, disable NTLM on these sites where clients allow it, and remove web enrollment roles nobody uses. The Certipy wiki notes that Windows Server 2025 enables EPA by default for new Web Enrollment installs, but upgraded servers still need manual configuration.

Certificate mapping and binding: ESC9, ESC10 and ESC14

These three ESCs are about how a domain controller or other server decides which account a certificate belongs to. Microsoft changed this behaviour after CVE-2022-26923, CVE-2022-26931 and CVE-2022-34691. KB5014754 introduced the SID extension and the StrongCertificateBindingEnforcement value under HKLM\SYSTEM\CurrentControlSet\Services\Kdc, where 1 is compatibility mode and 2 is full enforcement.

The KB5014754 timeline matters for planning. Full enforcement became the default on 11 February 2025, and Microsoft states that from 9 September 2025 the registry key is no longer supported and the option to return to compatibility mode ends. Domain controllers that are patched to current levels should therefore be enforcing. Unpatched or out-of-support domain controllers are the gap to look for. The Kerberos PKINIT and Certificate Mapping Guide covers the mapping model in more depth.

ESC9: template omits the security extension

Condition. A template sets CT_FLAG_NO_SECURITY_EXTENSION (bit 0x80000 in msPKI-Enrollment-Flag), so certificates lack the SID extension, and domain controllers are not in full enforcement.

Check. Search templates for the flag and confirm the binding mode on every domain controller.

Fix. Clear the flag, set full enforcement, restrict enrollment and require manager approval for any documented exception.

ESC10: weak Schannel UPN mapping

Condition. Schannel on a domain controller or other server maps certificates by UPN, which is a weak identifier.

Check. Read CertificateMappingMethods under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL and look for bit 0x4. Certipy does not read this key, so review it with your configuration management tooling.

Fix. The Certipy wiki recommends 0x18 for CertificateMappingMethods, alongside full enforcement on domain controllers. Test LDAPS and other Schannel clients first.

ESC14: weak explicit mappings

Condition. The altSecurityIdentities attribute on an account maps certificates using broad or non-unique identifiers, so a different certificate can match.

Check. Review altSecurityIdentities on privileged users and computers. KB5014754 classes X509IssuerSerialNumber, X509SKI and X509SHA1PublicKey as strong and X509IssuerSubject, X509SubjectOnly and X509RFC822 as weak. Also review who can write this attribute.

Fix. Move mappings to strong formats, with issuer and serial number the format Microsoft recommends, and remove mappings that are no longer needed.

Issuance policies, schema version 1 templates and HSMs: ESC12, ESC13 and ESC15

ESC12: YubiHSM2 on the CA host

Condition. The CA private key is held in a YubiHSM2 and a low-privileged user with local access to the CA host could abuse a weakness in the HSM software stack. The Certipy wiki treats this as a vendor and integration issue rather than an AD CS setting.

Check. Compare HSM client, key storage provider, driver and firmware versions with vendor advisories, and review who can log on locally to the CA host.

Fix. Patch the HSM stack, restrict local logon to the CA to PKI administrators and monitor HSM and CA service activity.

ESC13: issuance policy linked to a group

Condition. A template includes an issuance policy OID whose msDS-OIDToGroupLink attribute points to a security group, the template allows client authentication and a broad population can enrol. Logging on with such a certificate grants the linked group's access.

Check. List issuance policies on templates and inspect msDS-OIDToGroupLink on OID objects under CN=OID,CN=Public Key Services. Review the ACLs on those OID objects and the membership and privilege of each linked group.

Fix. Do not link OIDs to privileged groups. Restrict who can write OID objects, limit enrollment, and require manager approval and authorised signatures for high-impact templates.

ESC15: application policy injection (CVE-2024-49019)

Condition. An unpatched CA issues from a schema version 1 template that allows an enrollee-supplied subject, and carries request-supplied application policies into the certificate. This was published as "EKUwu" and fixed in the November 2024 updates.

Check. List schema version 1 templates with CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT and confirm every CA has the November 2024 update or later.

Fix. Patch all CAs, restrict enrollment on affected version 1 templates and replace them with version 2 or later duplicates. The Certipy wiki describes adding the application policies extension OID (1.3.6.1.4.1.311.21.10) to the CA disable list only as a last-resort workaround, because it can break legitimate requests.

Prioritising remediation across the catalogue

Most estates have more than one ESC open, and owners of certificate templates are often hard to find. NHI Mgmt Group suggests working in this order, which favours fixes that close several ESCs at once:

  1. Patch CAs and domain controllers. Current updates close ESC15 and move domain controllers to full binding enforcement, which blunts ESC6, ESC9, ESC10, ESC14 and ESC16.
  2. Remove CA-wide risk. Clear EDITF_ATTRIBUTESUBJECTALTNAME2, enforce RPC encryption and remove the SID extension OID from the disable list. These are three registry changes on a small number of servers.
  3. Harden or remove web enrollment. ESC8 is reachable from anywhere a relay can be staged, so it deserves early attention.
  4. Reduce the template estate. Unpublish templates with no issued certificates in the last year, then fix ESC1, ESC2, ESC3, ESC9 and ESC13 conditions on what remains.
  5. Tighten access control. Review template, PKI object, OID object and CA ACLs for ESC4, ESC5 and ESC7, and treat CA hosts as tier zero.
  6. Clean up explicit mappings. Move altSecurityIdentities entries to strong formats.

Record every template and CA in your non-human identity inventory with a named owner. Templates that issue certificates to services, web servers and devices are credentials factories, and they need the same ownership and review that you apply to service accounts.

Detection and monitoring

Prevention is the priority, but you also need to know when a fix regresses or when a certificate has already been misused.

  • Domain controller events. KB5014754 documents Kdcsvc events in the System log: event 39 when no strong mapping and no SID extension exist, event 40 when a certificate predates the account, and event 41 when the certificate's SID does not match the user. Event 41 deserves an alert in its own right.
  • CA auditing. Enable Certification Services auditing on every CA and forward the request and issuance events. Look for certificates whose subject or SAN does not match the requester, and for issuance from templates that rarely issue.
  • Configuration drift. Re-run template and CA checks on a schedule and alert on changes to template ACLs, msPKI-Certificate-Name-Flag, msPKI-Enrollment-Flag, CA EditFlags and InterfaceFlags. The SpecterOps post points to PSPKIAudit for audit and certificate triage.
  • Certificate inventory. Keep a record of issued authentication certificates. During an investigation you will need to find and revoke certificates issued through a misconfiguration, because resetting the victim's password does not invalidate them.

The relevant MITRE ATT&CK technique is T1649 Steal or Forge Authentication Certificates. For a live AD CS vulnerability response example, see the Certighost (CVE-2026-54121) Response Guide.

Common failure patterns

  • Fixing the template but not the CA. Teams clear ESC1 on templates while EDITF_ATTRIBUTESUBJECTALTNAME2 remains set on the CA, which reopens the same risk for every authentication template.
  • Relying on one scanner. ESC5, ESC10, ESC12 and ESC14 are not detected by Certipy and need separate review.
  • Leaving HTTP enrollment in place "for one legacy app". ESC8 stays open for the whole forest, not just that application.
  • Treating CA servers as ordinary member servers. Local administrators on a CA can issue anything, so CA hosts belong in the same tier as domain controllers.
  • Assuming enforcement because the date has passed. Unpatched or out-of-support domain controllers may still be in compatibility mode.
  • Revoking nothing after a fix. Certificates already issued through a misconfiguration keep working until they expire or are revoked.
  • Duplicating old templates. Copying a version 1 template carries its flags into the new template unless someone reviews them.

Practitioner checklist

  • Inventory every enterprise CA, published template and web enrollment server, each with a named owner.
  • Confirm all CAs have the November 2024 update or later and all domain controllers enforce strong certificate binding.
  • Clear EDITF_ATTRIBUTESUBJECTALTNAME2, set IF_ENFORCEENCRYPTICERTREQUEST and remove OID 1.3.6.1.4.1.311.25.2 from the CA disable list.
  • Require EPA and HTTPS on all enrollment web services, or remove them.
  • Unpublish unused templates, and fix enrollee-supplied subject, Any Purpose, enrollment agent, no-security-extension and group-linked issuance policy conditions on the rest.
  • Review ACLs on templates, PKI containers, OID objects, NTAuthCertificates and each CA, and restrict write rights to PKI administrators.
  • Check CertificateMappingMethods on domain controllers and servers and move altSecurityIdentities to strong formats.
  • Check HSM software and firmware versions on CA hosts and restrict local logon.
  • Forward Kdcsvc events 39, 40 and 41 and CA audit events to your SIEM, and alert on event 41.
  • Re-run the full ESC review quarterly and after every CA or template change.

Standards and references

Related NHI Mgmt Group resources: AD CS Security Guide · Certighost (CVE-2026-54121) Response Guide · Kerberos PKINIT and Certificate Mapping Guide · NTLM Relay Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.