Zum Hauptinhalt springen
LIVE Intel Feed
"Not a Pentest" Notice: Remediation guide for your own Windows infrastructure only.
Academy · CVE FeedHIGH · CVSS 7.5 · EXPLOITATION IN THE WILD

CVE-2025-30397

Windows Scripting Engine — Memory Corruption → Remote Code Execution

Impact: Memory corruption in Windows JScript/Chakra scripting engine enables RCE when a user processes attacker-controlled content (malicious web page via IE mode, script file, Office document). Exploitation confirmed in the wild. Patch: May 2025 Patch Tuesday (KB5058379 / KB5058383).

7.5
CVSS Score
HIGH
Severity
RCE
Impact
KB5058379
Fix KB

Step-by-Step Fix Runbook

1
Verify May 2025 Patch Tuesday update is installed
# Check if May 2025 cumulative update is installed
Get-HotFix | Where-Object {$_.HotFixID -in @("KB5058379","KB5058392","KB5058383")} |
  Select-Object HotFixID, InstalledOn

# Windows 11 23H2/24H2: KB5058379
# Windows 11 22H2:       KB5058392
# Windows 10 22H2:       KB5058383

# Check Windows version:
winver
[System.Environment]::OSVersion.Version

# Affected OS versions:
# Windows 10 (all supported versions)
# Windows 11 (all supported versions)
# Windows Server 2016, 2019, 2022, 2025

# Check via Windows Update history:
Get-WinEvent -FilterHashtable @{LogName='System'; Id=19} |
  Where-Object {$_.Message -like "*2025-05*"} |
  Select-Object TimeCreated, Message | Select-Object -First 5

# Check last successful update date:
(New-Object -ComObject Microsoft.Update.AutoUpdate).Results.LastInstallationSuccessDate
2
Apply May 2025 Patch Tuesday update
# Method 1: Windows Update Settings
# Settings > Windows Update > Check for updates > Install

# Method 2: PowerShell with PSWindowsUpdate module
Install-Module PSWindowsUpdate -Force -Scope CurrentUser
Import-Module PSWindowsUpdate
Get-WindowsUpdate -AcceptAll -Install -AutoReboot

# Method 3: WSUS / Microsoft Endpoint Manager (enterprise)
# Approve May 2025 Patch Tuesday bundle in WSUS console
# Force sync: Invoke-WUJob -ComputerName $targets -Script {Install-WindowsUpdate -AcceptAll}

# Method 4: Microsoft Update Catalog (offline)
# Download from: https://catalog.update.microsoft.com
# Search: KB5058379 (Windows 11) or KB5058383 (Windows 10)

# Verify installation after reboot:
Get-HotFix -Id KB5058379 -ErrorAction SilentlyContinue
# or:
Get-HotFix -Id KB5058383 -ErrorAction SilentlyContinue
3
Mitigations if patch cannot be immediately applied
# CVE-2025-30397 requires scripting engine to process crafted content
# Attack vectors: malicious web page, Office document with embedded script,
#                 email with HTML content, drive-by download

# Mitigation 1: Disable JScript/JScript9 (legacy scripting engines)
# WARNING: May break legacy web applications relying on JScript
# Set JScript to "Disable" in Internet Options for all zones:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones" /v 1400 /t REG_DWORD /d 3 /f
# Repeat for Internet zones 1, 2, and 3 by replacing the zone digit in the path above

# Mitigation 2: Enable Enhanced Protected Mode in IE (if IE still in use)
# This limits scripting engine damage via process isolation

# Mitigation 3: Deploy Attack Surface Reduction (ASR) rules via Defender
Set-MpPreference -AttackSurfaceReductionRules_Ids @(
    "BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550",  # Block executable content from email
    "D4F940AB-401B-4EFC-AADC-AD5F3C50688A"   # Block Office child processes
) -AttackSurfaceReductionRules_Actions @(1, 1)  # 1 = Block

# Mitigation 4: Network-level — block download of .js/.jse files at proxy:
# Squid/proxy: block MIME types application/javascript from untrusted domains
4
Detect exploitation attempts in Windows event logs
# Check for scripting engine crash events that may indicate exploitation:
Get-WinEvent -FilterHashtable @{
    LogName = 'Application'
    Id = 1000   # Application Error
    StartTime = (Get-Date).AddDays(-30)
} | Where-Object {
    $_.Message -match "jscript|chakra|wscript|cscript"
} | Select-Object TimeCreated, Message | Select-Object -First 20

# Check for WER (Windows Error Reporting) entries:
Get-ChildItem "C:ProgramDataMicrosoftWindowsWERReportArchive" -ErrorAction SilentlyContinue |
  Sort-Object LastWriteTime -Descending | Select-Object -First 10

# Check Defender for detection events:
Get-WinEvent -FilterHashtable @{
    LogName = 'Microsoft-Windows-Windows Defender/Operational'
    Id = 1116   # Malware detected
    StartTime = (Get-Date).AddDays(-30)
} | Select-Object TimeCreated, Message | Select-Object -First 20

# Check for suspicious script execution via Sysmon (if deployed):
Get-WinEvent -FilterHashtable @{
    LogName = 'Microsoft-Windows-Sysmon/Operational'
    Id = 1
    StartTime = (Get-Date).AddDays(-7)
} | Where-Object {
    $_.Message -match "wscript.exe|cscript.exe|mshta.exe"
} | Select-Object TimeCreated, Message | Select-Object -First 20
5
Browser and scripting engine hardening
# Long-term hardening to reduce scripting engine attack surface:

# 1. Enforce modern browser usage — disable IE mode where not needed
# Group Policy: Computer Configuration > Admin Templates > Windows Components
# > Internet Explorer > Disable Internet Explorer 11 as standalone browser

# 2. Microsoft Defender Application Guard for Edge (isolates browsing):
# Enable-WindowsOptionalFeature -Online -FeatureName Windows-Defender-ApplicationGuard
# New-ItemProperty -Path "HKLM:SOFTWAREPoliciesMicrosoftAppHVSI" -Name AllowAppHVSI -Value 1 -PropertyType DWORD -Force

# 3. Script block logging (PowerShell) — catches post-exploitation scripts:
Set-ItemProperty -Path "HKLM:SOFTWAREPoliciesMicrosoftWindowsPowerShellScriptBlockLogging" -Name EnableScriptBlockLogging -Value 1
Set-ItemProperty -Path "HKLM:SOFTWAREPoliciesMicrosoftWindowsPowerShellScriptBlockLogging" -Name EnableScriptBlockInvocationLogging -Value 1

# 4. Windows Defender Exploit Guard — Memory Protection:
Set-ProcessMitigation -System -Enable CFG  # Control Flow Guard
# Enable SEHOP (Structured Exception Handling Overwrite Protection):
Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetControlSession Managerkernel" -Name DisableExceptionChainValidation -Value 0

Frequently Asked Questions

What is the Windows Scripting Engine and why is it repeatedly vulnerable?

The Windows Scripting Engine (WSE) is a component that allows Windows to execute scripts in JScript (Microsoft's JavaScript implementation), VBScript, and other scripting languages. It's used by: Internet Explorer and IE mode in Edge, Windows Script Host (wscript.exe, cscript.exe), Office applications embedding scripts, HTA (HTML Application) files. Why it's repeatedly targeted: Legacy code: the JScript/VBScript engines are decades-old code written before modern memory-safety practices. Large attack surface: the scripting engine parses complex, attacker-controlled input (script code). Memory unsafety: C/C++ implementation with manual memory management — type confusion, use-after-free, and buffer overflows are common. Microsoft has been gradually deprecating these engines but cannot remove them entirely due to enterprise legacy application dependencies. The pattern: CVE-2025-30397 follows a long history of scripting engine CVEs (CVE-2020-0674, CVE-2021-26411, etc.) — all exploiting similar memory corruption patterns in the same codebase.

What are the attack vectors for CVE-2025-30397?

CVE-2025-30397 requires user interaction — the victim must process attacker-controlled content with the vulnerable scripting engine. Attack vectors: 1) Web-based: user visits a malicious website in a browser using the JScript engine (IE, IE mode in Edge). Most impactful for consumer and enterprise users still using IE mode. 2) Email-based: HTML email with embedded script, opened in Outlook with script execution enabled. 3) Office documents: macro-enabled documents or documents embedding web content that uses JScript. 4) Drive-by via advertising: malicious ad on a legitimate site triggers scripting engine — user does not need to click anything. 5) HTA files: attacker tricks user into running an HTA file (HTML Application) — executes with elevated privileges. Most likely exploit chain in 2025/2026: phishing email → victim opens HTML attachment → JScript in attachment triggers memory corruption → shellcode executes → Cobalt Strike beacon or ransomware deployment.

Is this vulnerability exploitable in modern Edge (Chromium) or Chrome?

No — CVE-2025-30397 affects the Windows JScript/Chakra scripting engine, which is NOT used by modern Chromium-based browsers (Edge Chromium, Chrome, Firefox). These browsers use their own JavaScript engines: V8 (Chrome/Edge Chromium) and SpiderMonkey (Firefox) — completely separate codebases not affected by this CVE. However, the vulnerability CAN still be triggered via: IE mode in Microsoft Edge — this mode uses the legacy Internet Explorer rendering engine (Trident/MSHTML) which uses the vulnerable JScript engine. Organisations using IE mode for legacy application compatibility are at risk. Windows Script Host (wscript.exe, cscript.exe) — standalone script execution. Office applications that embed web content using the IE rendering engine. Recommendation: audit IE mode usage in your organisation. If IE mode is not required, disable it via Group Policy. This removes the browser-based attack vector entirely.

How do I check if IE mode is enabled across my organisation?

IE mode audit for enterprise environments: 1) Check via Group Policy (if GPO-managed): gpresult /H gpo-report.html — look for 'Configure Internet Explorer integration' policy. Or via PowerShell: Get-GPOReport -All -ReportType XML | Select-String 'InternetExplorer'. 2) Check registry on individual machines: Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Edge' -Name 'InternetExplorerIntegrationLevel' — value 1 = IE mode enabled. 3) Intune/Endpoint Manager: review Edge configuration profiles for 'Internet Explorer mode' setting. 4) Enterprise Site List: if your organisation has an IE mode site list (enterprise site list XML), users with that site list configured will have IE mode active for those URLs. Find site list: Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Edge' -Name 'EnterpriseModeSiteListURL'. To disable IE mode if not needed: Set 'Configure Internet Explorer integration' GPO to 'Disabled' or 'None'.

Further Resources

🔒 Quantum-Resistant Mycelium Architecture
🛡️ Kuratierte Runbooks – EU-gehostet in Frankfurt
🌐 Zero Known Breaches – Powered by Living Intelligence
🏛️ DSGVO Art. 25 & 32 • SOC 2 & ISO 27001 in Vorbereitung
⚡ Real-Time Global Mycelium Network – 347 Bedrohungen in 60 Minuten
🧬 Trusted by SecOps Leaders worldwide