What is Windows Authenticode?
Windows Authenticode is the code signing framework used to verify the authenticity and integrity of executable files (PE files: .exe, .dll, .sys, .cab). When a publisher signs a file, a cryptographic hash (digest) of the file contents is embedded in the signature. WinVerifyTrust is the Windows API function that validates this signature — it checks that the certificate chain is trusted and that the file's actual content matches the signed digest. A flaw in this verification process can allow attackers to modify a signed file without invalidating the signature, effectively defeating one of Windows' core trust mechanisms.
Overview
CVE-2012-0151 is an improper input validation vulnerability (CWE-20) in the WinVerifyTrust function in Microsoft Windows. The function fails to correctly validate the digest of a signed portable executable (PE) file, allowing an attacker to append arbitrary data or code to a legitimately signed PE file while the Authenticode signature remains valid. This means malware can masquerade as a trusted, digitally signed binary.
Microsoft patched this in Security Bulletin MS12-024 on April 10, 2012.
Affected Versions
| Operating System | Affected |
|---|---|
| Windows XP SP3 | Yes |
| Windows XP x64 Edition SP2 | Yes |
| Windows Server 2003 SP2 (all editions) | Yes |
| Windows Vista SP2 | Yes |
| Windows Server 2008 SP2 | Yes |
| Windows 7 (all service packs) | Yes |
| Windows Server 2008 R2 (all service packs) | Yes |
Technical Details
Authenticode PE signature verification works by hashing specific sections of a PE file according to a defined algorithm, then verifying that hash matches the signed digest. CVE-2012-0151 arises because WinVerifyTrust did not properly account for data appended after the end of the PE file's last section — data outside the measured portions of the file.
An attacker can:
- Obtain a legitimately signed PE file from a trusted publisher
- Append arbitrary code or data after the verified portion
- Craft a PE that executes the appended malicious code
- The resulting file passes
WinVerifyTrustand appears fully trusted to Windows security checks
This bypasses User Account Control (UAC) prompts, application allowlisting based on signed publisher trust, and security software that relies on Authenticode validity as a trust signal.
Attack vector: Local/UI:Required — the victim must execute the crafted file. The attack is typically delivered via social engineering (email attachment, download link) and relies on the apparent legitimacy of the Authenticode signature to convince the user to run it.
Discovery
The vulnerability was discovered through security research into the Authenticode signing verification process and coordinated with Microsoft before the MS12-024 patch release.
Exploitation Context
CISA confirmed exploitation in the wild. This vulnerability is particularly effective for social engineering campaigns targeting organizations with "run only signed applications" policies — the apparent Authenticode trust can bypass both technical controls and user suspicion. Malware authors used this technique to trojanize otherwise legitimate signed installers or system utilities.
Remediation
- Apply MS12-024 on all affected Windows systems immediately
- Modern Windows versions (8.1+) include stricter Authenticode validation that addresses this class of issue — prioritize upgrading end-of-life Windows versions
- Supplement Authenticode trust with additional controls: application allowlisting based on file hash rather than certificate alone, endpoint detection that analyzes PE structure, and sandboxing
- Do not treat Authenticode signature presence as a sufficient trust signal for allowing execution — validate against known-good hashes from authoritative sources
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2012-0151 |
| Vendor / Product | Microsoft — Windows |
| NVD Published | 2012-04-10 |
| NVD Last Modified | 2025-10-22 |
| CVSS 3.1 Score | 7.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-20 find similar ↗ |
| CISA KEV Added | 2022-06-08 |
| CISA KEV Deadline | 2022-06-22 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2012-04-10 | Microsoft releases MS12-024 patching the WinVerifyTrust digest validation flaw |
| 2012-04-10 | CVE-2012-0151 published |
| 2022-06-08 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-06-22 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2012-0151 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Microsoft Security Bulletin MS12-024 | Vendor Advisory |