CVE DatabaseCVE-2012-0158
한국어 권고문 →
CVE-2012-01588.8/HIGHCISA KEVCWE-94CWE-94

Microsoft Office and SQL Server MSCOMCTL.OCX ActiveX Control Remote Code Execution Vulnerability (CVE-2012-0158)

⚡ Jump to Patch
Affected Vendors
microsoft
Affected Components
office, sql_server, biztalk_server, commerce_server, visual_foxpro, visual_basic
Published Date
2012-04-10
CVSS v3.1
8.8
HIGH
EPSS (30d)
100.0%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Microsoft Office 2003/2007/2010, SQL Server 2000/2005/2008, and Visual Basic 6.0 Runtime utilizing the MSCOMCTL.OCX library

Impact

Remote attackers can execute arbitrary code with the privileges of the active user by enticing them to open a crafted Office document, RTF file, or malicious website

Mitigation

Apply the official Microsoft MS12-027 security patch immediately, or configure registry Kill-Bits to disable the vulnerable ActiveX controls

Affected Products & Version Scope

Microsoft Office 2003 SP3, 2007 SP2/SP3, 2010 Gold/SP1, SQL Server 2000 SP4, 2005 SP4, 2008 SP2/SP3/R2, Visual Basic 6.0 Runtime, and related components

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Deploy the MS12-027 security update provided by Microsoft. You can verify the version of MSCOMCTL.OCX on your endpoints using the following PowerShell script to ensure it has been updated to a secure version.

powershell
# Check MSCOMCTL.OCX file version
$paths = @(
    'C:\Windows\System32\mscomctl.ocx',
    'C:\Windows\SysWOW64\mscomctl.ocx'
)
foreach ($path in $paths) {
    if (Test-Path $path) {
        $version = (Get-Item $path).VersionInfo.FileVersion
        Write-Host '[+] Found: ' $path ' (Version: ' $version ')'
    } else {
        Write-Host '[-] Not Found: ' $path
    }
}

2. Temporary Workaround & Hardening Configuration

If patching is not immediately feasible in legacy environments, disable the vulnerable ActiveX controls by setting the compatibility flags (Kill-Bit) in the Windows Registry. Run the following commands in an elevated Command Prompt:

cmd
:: Set Kill-Bit for vulnerable ListView and TreeView ActiveX controls
reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{BDD1F04B-858B-11D1-B16A-00C0F0283628}" /v "Compatibility Flags" /t REG_DWORD /d 0x00000400 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{BDD1F04B-858B-11D1-B16A-00C0F0283628}" /v "Compatibility Flags" /t REG_DWORD /d 0x00000400 /f

3. Log Audit & IoC Verification Commands

To scan for potentially malicious RTF files containing the specific Class ID associated with this exploit, execute the following PowerShell script on target directories:

powershell
# Scan for RTF files containing the CVE-2012-0158 CLSID
$targetDir = 'C:\Users'
$clsid = 'BDD1F04B-858B-11D1-B16A-00C0F0283628'

Get-ChildItem -Path $targetDir -Filter *.rtf -Recurse -ErrorAction SilentlyContinue | ForEach-Object {
    $content = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue
    if ($content -and $content.Contains($clsid)) {
        Write-Warning '[!] Potential CVE-2012-0158 exploit file found: ' $_.FullName
    }
}
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Audit all legacy Windows endpoints for vulnerable MSCOMCTL.OCX versions and apply the MS12-027 patch or registry Kill-Bits immediately to prevent remote code execution.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability exists in the MSCOMCTL.OCX library, which provides common controls for Windows applications. Specifically, the ListView, ListView2, TreeView, and TreeView2 ActiveX controls fail to properly validate input data boundaries when parsing serialized object data. This lack of validation leads to a stack-based buffer overflow, resulting in system state corruption and allowing arbitrary code execution.

2. Exploitation Mechanics & Attack Scenario

An attacker crafts a malicious document (such as a .doc or .rtf file) or a web page containing embedded, malformed ActiveX objects. When a user opens the document or visits the web page using a browser that supports ActiveX (e.g., Internet Explorer), the application loads MSCOMCTL.OCX to render the controls. The malformed data triggers the buffer overflow, overwriting the return address on the stack and redirecting execution flow to the attacker's payload (shellcode).

3. Infrastructure & Business Impact

As a highly exploited vulnerability listed in the CISA KEV database, CVE-2012-0158 has been heavily utilized by advanced persistent threat (APT) actors in spear-phishing campaigns. Successful exploitation grants the attacker full control over the compromised endpoint, potentially leading to lateral movement within the corporate network, data exfiltration, and deployment of ransomware.

Official Vendor Advisories & References

NVD Original English Description

The (1) ListView, (2) ListView2, (3) TreeView, and (4) TreeView2 ActiveX controls in MSCOMCTL.OCX in the Common Controls in Microsoft Office 2003 SP3, 2007 SP2 and SP3, and 2010 Gold and SP1; Office 2003 Web Components SP3; SQL Server 2000 SP4, 2005 SP4, and 2008 SP2, SP3, and R2; BizTalk Server 2002 SP1; Commerce Server 2002 SP4, 2007 SP2, and 2009 Gold and R2; Visual FoxPro 8.0 SP1 and 9.0 SP2; and Visual Basic 6.0 Runtime allow remote attackers to execute arbitrary code via a crafted (a) web site, (b) Office document, or (c) .rtf file that triggers "system state" corruption, as exploited in the wild in April 2012, aka "MSCOMCTL.OCX RCE Vulnerability."

Frequently Asked SecOps Questions (CVE-2012-0158)

FAQ

Q1. How critical is CVE-2012-0158 and is it actively exploited in the wild?

CVE-2012-0158 is rated CVSS 8.8 (HIGH) with a 30-day EPSS exploitation probability of 100.0%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2012-0158?

Primary impacted vendors include microsoft across office, sql_server, biztalk_server, commerce_server, visual_foxpro, visual_basic. Scope summary: Microsoft Office 2003 SP3, 2007 SP2/SP3, 2010 Gold/SP1, SQL Server 2000 SP4, 2005 SP4, 2008 SP2/SP3/R2, Visual Basic 6.0 Runtime, and related components

Q3. What temporary mitigations or workarounds exist for CVE-2012-0158 before patching?

[Mitigation] Apply the official Microsoft MS12-027 security patch immediately, or configure registry Kill-Bits to disable the vulnerable ActiveX controls Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2012-0158

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (microsoft)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2012-0158 Microsoft Office and SQL Server MSCOMCTL.OCX ActiveX Control Remote Code Execution Vulnerability (CVE-2012-0158) (CVSS 8.8) - Patch & Workaround | CVE Pulse