AD CS Template Allows a Requester-Supplied Subject (ESC1)
A certificate template lets low-privileged users request authentication certificates for any identity they choose, such as a domain administrator.
| Severity | High |
| CVSS 3.1 | 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 8.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-807: Reliance on Untrusted Inputs in a Security Decision |
| OWASP Top 10 | A06:2025 Insecure Design |
| MITRE ATT&CK | T1649 Steal or Forge Authentication Certificates, T1550.003 Pass the Ticket |
| Category | Security Misconfiguration |
Description
An enterprise certification authority (CA) publishes a certificate template that lets the requester supply the certificate's subject, including its subject alternative name (SAN), while allowing low-privileged users to enrol and producing certificates that can be used to authenticate to Active Directory. Such a template has Supply in the request selected on its Subject Name tab (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT in msPKI-Certificate-Name-Flag), an extended key usage (EKU) that permits authentication (Client Authentication, PKINIT Client Authentication, Smart Card Logon, Any Purpose, or no EKU at all), enrolment rights for a broad group such as Domain Users, Domain Computers or Authenticated Users, and no requirement for manager approval or authorised signatures.
Because the CA issues the certificate for whichever identity the request names, any member of that group, including an account an attacker has phished or guessed, can obtain a certificate for another user, such as a domain administrator, and authenticate as that user through Kerberos (PKINIT) or Schannel, giving full control of the domain. The attack needs only standard enrolment requests and is reliable, and the certificate stays valid for its whole validity period, set by the template and often a year or more, even if the impersonated account's password is changed, so it also provides durable persistence.
Microsoft's strong certificate mapping changes do not prevent it, because the requester can also include the target account's security identifier (SID) in the SAN. Where enrolment is limited to Domain Computers, any user can usually still exploit it by creating a computer account, which ordinary users can do by default.
It is documented as ESC1 in the Certified Pre-Owned research. Certipy (certipy find -vulnerable), Certify, BloodHound and PingCastle identify such templates from the template objects and CA configuration in Active Directory, which any domain user can read.
Remediation
- On the affected template, select Build from this Active Directory information on the Subject Name tab instead of Supply in the request. Where the template's purpose genuinely needs a requester-supplied subject, such as web server certificates, remove the authentication EKUs and restrict enrolment to the administrators who issue those certificates.
- Remove enrolment rights from broad groups such as Domain Users, Domain Computers and Authenticated Users, granting them only to the groups that need the template.
- Where a template must keep these settings, require CA certificate manager approval on the Issuance Requirements tab so that each request is reviewed.
- Stop publishing templates that are no longer needed, since an unpublished template cannot be requested.
- Review the CA database for certificates already issued from the template with a SAN naming a different account from the requester, and revoke any that are not legitimate: a certificate remains usable after the template is fixed.
Confirm the fix by running certipy find -vulnerable again and requesting a certificate with a SAN naming another account, which should be refused or issued with the requester's own identity only.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.