How To

Find and Patch Java4Shell (CVE-2026-114938) on Windows Server

A Windows server rarely runs only the Java you installed. Java4Shell (CVE-2026-114938) has to be fixed in every runtime on the box: the JDK in PATH, the one a Windows service loads, and the private copy an application unpacked into its own folder. Most of those never show up in java -version, and none of them update when you patch the one that does.

Original content from computingforgeeks.com - post 192094

This guide gives you a read-only PowerShell script that finds and grades every Java runtime, then sets the stopgap and installs a fixed build. The Java4Shell CVE-2026-114938 overview covers the bug. We tested every step in November 2026 on Windows Server 2025 running on an AWS m6i instance (Intel Ice Lake, AVX-512 VBMI present).

Which Windows Java builds are fixed?

The fixed upstream builds are 17.0.21.1, 21.0.13.1 and 25.0.5.1, or later. On Windows that matters more than on Linux, because no distribution packages Java for you: whichever vendor installed the JDK decides when you get the fix. This is where each vendor stood on 19 November 2026:

VendorFixed Windows x64 buildHow you get it
Microsoft Build of OpenJDK17.0.21.1, 21.0.13.1, 25.0.5.1MSI or ZIP from Microsoft; winget package versions 17.0.21.102, 21.0.13.102, 25.0.5.102
Eclipse TemurinNone yet: Windows is still on 17.0.21+9, 21.0.13+9, 25.0.5+8The fixed .1 builds exist for Linux x64 and Apple silicon Macs (Alpine for 17 and 21 only), not Windows x64; winget offers 21.0.13.9 (vulnerable)
Amazon Corretto17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2MSI from Amazon; winget Amazon.Corretto.21.JDK 21.0.13.1
Azul Zulu17.0.21.1 (zulu17.70.201), 21.0.13.1 (zulu21.54.201), 25.0.5.1 (zulu25.38.201)MSI from Azul; winget Azul.Zulu.21.JDK 21.54.201. The JavaFX (fx) builds were still on the vulnerable .0.3 line
BellSoft Liberica17.0.21.1+5, 21.0.13.1+5, 25.0.5.1+5MSI from BellSoft
Oracle JDK21.0.13.1 and the other .1 linesOracle download page; winget Oracle.JDK.25 offers 25.0.5.1, while Oracle.JDK.21 still offers 21.0.12.0
Red Hat build of OpenJDK17.0.21.1 and 21.0.13.1 (RHSA-2026:100566, RHSA-2026:100570)Red Hat customer portal; the 25 Windows build is still listed as Affected

The Temurin row is the one to plan around. Temurin is a popular free JDK on Windows, and its Windows installers had not been rebuilt when we checked, so a Temurin host has no in-place fix today. You either set the stopgap flag or move that workload to a vendor that has shipped, which is what we do below with the Microsoft build. Game servers hit the same wall, and our Minecraft server Java4Shell guide covers the launcher runtime that Windows players still run.

Can your CPU run the vulnerable code?

Only if the CPU exposes all four of avx512f, avx512bw, avx512_vbmi and bmi2. Windows has no /proc/cpuinfo to grep, but the JVM prints the features it detected when you start it with -Xlog:os+cpu. The finder script below does that for you and reports the result first, so you know whether the rest of the scan is urgent.

CPU features for the Base64 stub: avx512f, avx512bw, avx512_vbmi, bmi2 (4 of 4)
This CPU can run the vulnerable code path.

Our lab instance reported an Intel Xeon Platinum 8375C, an Ice Lake part, and all four features. A host that shows fewer than four cannot build the vulnerable Base64 stub, so it sits out of scope even on an affected JDK. Skylake and Cascade Lake Xeons fall in that group, while Ice Lake and newer Xeons and AMD Zen 4 or newer do not.

Where do Java runtimes hide on Windows?

There is no package database that knows about every JVM, so the script checks five places and records which one found each runtime. That list is what tells you whether a JDK is the one your services actually load.

  • Running processes that loaded jvm.dll, whatever the executable is called, such as tomcat10.exe or a renamed launcher.
  • Windows services whose image path points at java.exe, plus procrun services (Tomcat and others) whose JVM path sits in the registry.
  • JAVA_HOME and PATH at machine and user scope.
  • The installed-programs list, where MSI and EXE installers record an install folder.
  • Every java.exe under a bin folder on the fixed disks, which catches JREs that applications unpack into their own directories.

The disk scan is the slow part and the one that finds the copies nobody remembers. On our host the first full run took about three and a half minutes and a repeat took 27 seconds once the file cache was warm. -SkipDiskScan finished in 1.5 seconds, but it would miss a bundled JRE that is not running when you scan.

How do you run the finder script?

Save the script as Find-JavaRuntimes.ps1 on the server, then run it from an elevated prompt. It only reads, so it is safe to run on production servers. We ran it in Windows PowerShell 5.1, which every Windows Server ships, and did not test it under 7; our notes on PowerShell 7 and 5.1 on Windows Server explain how the two differ.

# Find-JavaRuntimes.ps1: list every Java runtime on a Windows host and flag Java4Shell (CVE-2026-114938) exposure.
# Read-only. Run from an elevated PowerShell 5.1 or 7 prompt. Use -SkipDiskScan for a quick pass.
[CmdletBinding()]
param([switch]$SkipDiskScan)

$fixed = @{ 17 = [version]'17.0.21.1'; 21 = [version]'21.0.13.1'; 25 = [version]'25.0.5.1'; 27 = [version]'27.0.1.1' }
$homes = @{}

function Add-JavaHome([string]$Path, [string]$Source) {
    if (-not $Path) { return }
    $Path = $Path.Trim().Trim('"')
    $Path = $Path -replace '\\bin\\(server\\jvm\.dll|javaw?\.exe)$', ''
    if (-not (Test-Path -LiteralPath (Join-Path $Path 'bin\java.exe'))) { return }
    $key = (Resolve-Path -LiteralPath $Path).Path.TrimEnd('\')
    if (-not $homes.ContainsKey($key)) { $homes[$key] = New-Object System.Collections.Generic.List[string] }
    if (-not $homes[$key].Contains($Source)) { $homes[$key].Add($Source) }
}

# 1. Running processes that loaded a JVM, whatever the .exe is called (tomcat10.exe, prunsrv, javaw)
$running = @()
foreach ($p in Get-Process) {
    try { $jvm = $p.Modules | Where-Object ModuleName -eq 'jvm.dll' | Select-Object -First 1 } catch { continue }
    if ($jvm) {
        Add-JavaHome $jvm.FileName "process $($p.ProcessName) ($($p.Id))"
        $running += [pscustomobject]@{ PID = $p.Id; Process = $p.ProcessName; Jvm = $jvm.FileName }
    }
}

# 2. Services: java.exe in the image path, or a procrun (Tomcat-style) service pointing at a jvm.dll
foreach ($s in Get-CimInstance Win32_Service) {
    if ($s.PathName -match '"?([^"]+\\bin\\javaw?\.exe)') { Add-JavaHome $Matches[1] "service $($s.Name)" }
}
foreach ($root in 'HKLM:\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0', 'HKLM:\SOFTWARE\Apache Software Foundation\Procrun 2.0') {
    Get-ChildItem $root -ErrorAction SilentlyContinue | ForEach-Object {
        $jvm = (Get-ItemProperty "$($_.PSPath)\Parameters\Java" -ErrorAction SilentlyContinue).Jvm
        Add-JavaHome $jvm "procrun service $($_.PSChildName)"
    }
}

# 3. JAVA_HOME and PATH, machine and user scope
foreach ($scope in 'Machine', 'User') {
    Add-JavaHome ([Environment]::GetEnvironmentVariable('JAVA_HOME', $scope)) "JAVA_HOME ($scope)"
    foreach ($dir in ([Environment]::GetEnvironmentVariable('Path', $scope) -split ';')) {
        if ($dir -and (Test-Path -LiteralPath (Join-Path $dir 'java.exe'))) { Add-JavaHome (Split-Path $dir) "PATH ($scope)" }
    }
}

# 4. Installed programs (MSI and EXE installers record an install location)
$uninstall = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
Get-ItemProperty $uninstall -ErrorAction SilentlyContinue |
    Where-Object { $_.DisplayName -match 'Java|JDK|JRE|OpenJDK|Temurin|Corretto|Zulu|Liberica|SapMachine|Semeru' -and $_.InstallLocation } |
    ForEach-Object { Add-JavaHome $_.InstallLocation "installed: $($_.DisplayName)" }

# 5. Every java.exe on the fixed disks, which finds JREs bundled inside applications
if (-not $SkipDiskScan) {
    foreach ($d in Get-CimInstance Win32_LogicalDisk -Filter 'DriveType=3') {
        Get-ChildItem -Path "$($d.DeviceID)\" -Filter java.exe -Recurse -File -Force -ErrorAction SilentlyContinue |
            Where-Object { $_.DirectoryName -like '*\bin' } |
            ForEach-Object { Add-JavaHome $_.FullName 'disk scan' }
    }
}

function Get-JavaVersion([string]$JavaHome) {
    $release = Join-Path $JavaHome 'release'
    if (Test-Path -LiteralPath $release) {
        $r = Get-Content -LiteralPath $release
        $v = ($r | Select-String '^JAVA_VERSION="([^"]+)"').Matches.Groups[1].Value
        $vendor = ($r | Select-String '^IMPLEMENTOR="([^"]+)"').Matches.Groups[1].Value
        $build = ($r | Select-String '^JAVA_RUNTIME_VERSION="([^"]+)"').Matches.Groups[1].Value
    }
    if (-not $v) {
        $out = & (Join-Path $JavaHome 'bin\java.exe') -version 2>&1 | ForEach-Object { "$_" }
        $v = ([regex]::Match(($out -join ' '), 'version "([^"]+)"')).Groups[1].Value
    }
    [pscustomobject]@{ Version = $v; Build = $build; Vendor = $vendor }
}

function Get-Verdict([string]$Version) {
    if (-not $Version) { return 'UNKNOWN' }
    $clean = ($Version -replace '^1\.8\.0_', '8.0.') -replace '[^0-9.].*$', ''
    $parts = $clean.Split('.')
    $feature = [int]$parts[0]
    $ver = [version](($parts + @('0', '0', '0'))[0..3] -join '.')
    if ($feature -lt 17) { return 'not affected' }
    if ($feature -eq 17 -and $ver -lt [version]'17.0.6') { return 'not affected' }
    if ($fixed.ContainsKey($feature)) {
        if ($ver -ge $fixed[$feature]) { return 'fixed' } else { return "VULNERABLE (fixed in $($fixed[$feature]))" }
    }
    if ($feature -lt 27) { return 'VULNERABLE (line has no fix, move to 21 or 25)' }
    return 'check vendor'
}

# CPU: ask the JVM which features it sees; the vulnerable stub needs all four.
# Java 8 has no -Xlog, so try each runtime until one answers.
$cpu = $null
foreach ($h in $homes.Keys) {
    $cpu = & (Join-Path $h 'bin\java.exe') '-Xlog:os+cpu' -version 2>&1 | ForEach-Object { "$_" } | Select-String 'CPU: total' | Select-Object -First 1
    if ($cpu) { break }
}
if ($cpu) {
    $need = 'avx512f', 'avx512bw', 'avx512_vbmi', 'bmi2'
    $has = $need | Where-Object { $cpu -match "[ ,]$_(,|$)" }
    "CPU features for the Base64 stub: $($has -join ', ') ($($has.Count) of 4)"
    if ($has.Count -eq 4) { 'This CPU can run the vulnerable code path.' } else { 'This CPU cannot run the vulnerable code path.' }
    ''
} elseif ($homes.Count) {
    'CPU features could not be read (no runtime here supports -Xlog); treat this CPU as capable.'
    ''
}

$homes.GetEnumerator() | Sort-Object Name | ForEach-Object {
    $v = Get-JavaVersion $_.Key
    [pscustomobject]@{
        JavaHome = $_.Key
        Version  = $v.Version
        Vendor   = $v.Vendor
        Verdict  = Get-Verdict $v.Version
        FoundBy  = ($_.Value -join '; ')
    }
} | Format-List

if ($running) {
    'Running JVMs:'
    $running | Format-Table -AutoSize
}

The CPU probe above tries each runtime in turn, because Java 8 cannot answer -Xlog. We made that change after the lab run, which used the first runtime found; on our host every runtime was Java 17 or newer, so the output below is the same.

Run it with the execution policy bypassed for this one process, so you do not have to sign it or change the machine policy.

powershell -NoProfile -ExecutionPolicy Bypass -File C:\lab\Find-JavaRuntimes.ps1

Our lab server had three runtimes: a Temurin 21 MSI that a Tomcat 10.1 service loads, a Microsoft OpenJDK 21.0.12 MSI that owns JAVA_HOME, and a Temurin 17 JRE that a reporting app runs from its own folder under a startup task. The scan found all three and marked each one:

JavaHome : C:\Program Files\AcmeReports\jdk-17.0.21+9-jre
Version  : 17.0.21
Vendor   : Eclipse Adoptium
Verdict  : VULNERABLE (fixed in 17.0.21.1)
FoundBy  : process java (3252); disk scan

JavaHome : C:\Program Files\Eclipse Adoptium\jdk-21
Version  : 21.0.13
Vendor   : Eclipse Adoptium
Verdict  : VULNERABLE (fixed in 21.0.13.1)
FoundBy  : process tomcat10 (4700); procrun service Tomcat10; PATH (Machine); installed: Eclipse
           Temurin JDK with Hotspot 21.0.13+9 (x64); disk scan

JavaHome : C:\Program Files\Microsoft\jdk-21.0.12.8-hotspot
Version  : 21.0.12
Vendor   : Microsoft
Verdict  : VULNERABLE (fixed in 21.0.13.1)
FoundBy  : JAVA_HOME (Machine); PATH (Machine); installed: Microsoft Build of OpenJDK  21.0.12+8
           (x64); disk scan

Running JVMs:

 PID Process  Jvm
 --- -------  ---
3252 java     C:\Program Files\AcmeReports\jdk-17.0.21+9-jre\bin\server\jvm.dll
4700 tomcat10 C:\Program Files\Eclipse Adoptium\jdk-21\bin\server\jvm.dll

Read the FoundBy column before you patch anything. The Temurin 17 JRE under AcmeReports turned up only through its running process and the disk scan, so a check of JAVA_HOME, PATH or installed programs would have reported a clean server. The Tomcat JDK shows up five ways, which is why it is the one people patch first, and the bundled copy is the one they forget. That gap is the reason the disk scan stays on by default, even though it costs minutes on a large server.

If you manage many machines through an RMM tool, DistributedIT’s Java4Shell check does a similar search and returns one line per machine for a custom field. Our script prints the detail you want while you fix one server at a time.

Is the server actually exposed?

A vulnerable build string on a capable CPU is enough to act on. To show the risk is real on your own hardware, Calif’s published trigger warms the decoder and checks whether bytes past the output got written. We ran their file unmodified (it is not reproduced here; the Calif write-up has it), three times on each Java 21 build:

runtime=21.0.13+9-LTS
REPRODUCED
runtime=21.0.13+9-LTS
NOT REPRODUCED
runtime=21.0.13+9-LTS
NOT REPRODUCED
runtime=21.0.12+8-LTS
REPRODUCED
runtime=21.0.12+8-LTS
REPRODUCED
runtime=21.0.12+8-LTS
NOT REPRODUCED

Temurin 21.0.13+9 reproduced once in three runs and Microsoft 21.0.12 twice. That spread is normal for this trigger, and it cannot see Java 17 at all, because its input is sized for 21 and 25. Treat a REPRODUCED as proof and a quiet run as nothing, because a vulnerable build can pass several runs in a row. Keep the build string plus the flag value as your evidence, so the change record holds up when someone asks how you know.

How do you turn off the vulnerable path?

The stopgap is -XX:-UseBASE64Intrinsics, which makes the JVM use its plain Java Base64 decoder instead of the AVX-512 stub. On Windows you can set it for every JVM at once through a machine-wide JAVA_TOOL_OPTIONS, or for one service at a time. Start with the machine-wide variable, because it covers the runtimes you have not found yet.

setx /M JAVA_TOOL_OPTIONS "-XX:-UseBASE64Intrinsics"

Windows saves it straight away, and the value applies to processes started after this by Explorer, the service manager or a new shell. setx replaces any existing JAVA_TOOL_OPTIONS, so read the current value first and append to it. Processes that are already running keep their old environment, which the next two checks show.

SUCCESS: Specified value was saved.

New processes see it, and a service picks it up on its next restart. After Restart-Service Tomcat10, the service’s stderr log showed the JVM had read the variable:

Get-ChildItem C:\Tomcat\logs\tomcat10-stderr*.log | Sort-Object LastWriteTime | Select-Object -Last 1 | Get-Content | Select-String "Picked up"
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics

A JVM that started before you set the variable keeps the vulnerable path on until it restarts. The AcmeReports process, launched by its startup task, still reported the intrinsic on. Ask the live process with jcmd from any JDK on the box.

$apid = (Get-Process java).Id; & "C:\Program Files\Eclipse Adoptium\jdk-21\bin\jcmd.exe" $apid VM.flags -all 2>&1 | ForEach-Object { "$_" } | Select-String "bool UseBASE64Intrinsics"
     bool UseBASE64Intrinsics                      = true
{product} {default}

After we stopped and restarted the task, the same check reported false with the source {environment}. With the variable in place, Calif’s trigger came back NOT REPRODUCED in all six runs across both Java 21 builds:

runtime=21.0.13+9-LTS
NOT REPRODUCED
runtime=21.0.13+9-LTS
NOT REPRODUCED
runtime=21.0.13+9-LTS
NOT REPRODUCED
runtime=21.0.12+8-LTS
NOT REPRODUCED
runtime=21.0.12+8-LTS
NOT REPRODUCED
runtime=21.0.12+8-LTS
NOT REPRODUCED

Two catches come with the machine-wide route, and both bite quietly because nothing fails at the moment you set the variable. A script can break days later, or a service can stay exposed while the variable looks correct. Check for both before you call the server mitigated.

  • Every Java command on the server now prints Picked up JAVA_TOOL_OPTIONS to stderr, so a script that parses java -version output can trip over the extra line.
  • Some launchers strip the variable before the JVM starts. Elasticsearch and OpenSearch do, as our Elasticsearch and OpenSearch Java4Shell guide shows, so the flag has to be checked on each product.

To take the machine-wide setting back out later, clear the variable with [Environment]::SetEnvironmentVariable("JAVA_TOOL_OPTIONS", $null, "Machine") and restart the services again.

For one service, put the flag in the service’s own settings instead. A procrun service such as Tomcat keeps its JVM options in the registry, and ++JvmOptions appends one without touching the rest:

C:\Tomcat\bin\tomcat10.exe //US//Tomcat10 ++JvmOptions=-XX:-UseBASE64Intrinsics

The service’s Java options now end with the flag, after the Tomcat defaults it kept.

-Dcatalina.home=C:\Tomcat
-Dcatalina.base=C:\Tomcat
-Djava.io.tmpdir=C:\Tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Tomcat\conf\logging.properties
-Dsun.io.useCanonCaches=false
-XX:-UseBASE64Intrinsics

Restart the service and confirm the live JVM took it, because procrun only reads its options when the service starts. The source now reads {command line}, which is how you tell a per-service setting from the machine-wide one.

Restart-Service Tomcat10; Start-Sleep 5; $tpid = (Get-Process tomcat10).Id; & "C:\Program Files\Eclipse Adoptium\jdk-21\bin\jcmd.exe" $tpid VM.flags -all 2>&1 | ForEach-Object { "$_" } | Select-String "bool UseBASE64Intrinsics"
     bool UseBASE64Intrinsics                      = false
{product} {command line}

Jira and Confluence run as the same kind of procrun service on Windows, and our Jira and Confluence Java4Shell guide covers their settings. For a plain Java app started by a task or a script, add the flag to its command line or its own config file.

How do you install a fixed build?

The fix on a Windows host is five moves, and the order matters because the stopgap should stay on until a fixed JVM is confirmed running.

  1. Install the fixed build from a vendor that has shipped.
  2. Point every service that names a JVM path at the fixed folder.
  3. Swap the runtime inside any application that bundles its own.
  4. Uninstall the old runtime once nothing loads it.
  5. Remove the stopgap flag after the finder reports fixed.

Install the fixed MSI over the old one and restart what loads it. We downloaded Microsoft’s 21.0.13.1 MSI from the Microsoft Build of OpenJDK download page and checked its SHA256 against the published value before running it:

$ProgressPreference="SilentlyContinue"; Invoke-WebRequest "https://aka.ms/download-jdk/microsoft-jdk-21.0.13.1-windows-x64.msi" -OutFile C:\lab\msjdk21.msi; (Get-FileHash C:\lab\msjdk21.msi -Algorithm SHA256).Hash
B558C8B7E559EEAF195489C2557ABD779C72D72D72CE4E120335BDF2FFBD4580

The hash matched the checksum Microsoft publishes, so the file is the one Microsoft built. A quiet install replaces the 21.0.12 folder with the fixed one and moves JAVA_HOME along with it, which means anything that resolves Java through JAVA_HOME picks up the fix on its next start.

Start-Process msiexec.exe -Wait -ArgumentList "/i C:\lab\msjdk21.msi ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJavaHome /qn /norestart"; Get-ChildItem "C:\Program Files\Microsoft" -Directory | Select-Object Name; [Environment]::GetEnvironmentVariable("JAVA_HOME","Machine")
Name
----
jdk-21.0.13.102-hotspot
C:\Program Files\Microsoft\jdk-21.0.13.102-hotspot\

Tomcat ran on Temurin 21, which has no fixed Windows build, so we pointed the service at the Microsoft JDK instead. Procrun stores the JVM path itself, and changing JAVA_HOME alone would not move it, so update both values on the service.

$jdk = "C:\Program Files\Microsoft\jdk-21.0.13.102-hotspot"; C:\Tomcat\bin\tomcat10.exe //US//Tomcat10 --JavaHome="$jdk" --Jvm="$jdk\bin\server\jvm.dll"
Restart-Service Tomcat10; Start-Sleep 5; $tpid = (Get-Process tomcat10).Id; & "C:\Program Files\Microsoft\jdk-21.0.13.102-hotspot\bin\jcmd.exe" $tpid VM.version 2>&1 | ForEach-Object { "$_" }
2916:
OpenJDK 64-Bit Server VM version 21.0.13.1+2-LTS
JDK 21.0.13.1

The bundled JRE got the same treatment with the Microsoft 17.0.21.1 ZIP: we unpacked it next to the app, pointed the startup task at it and removed the old folder, and jcmd reported 17.0.21.1 for the restarted process. How you swap a bundled runtime depends on the app, so check whether yours reads its Java path from a config file, a task or its own launcher.

Once nothing loads the old Temurin 21, uninstall it so the next scan stays clean, then take the per-service flag back out. Keeping the flag on a fixed JVM only costs Base64 speed. The uninstall uses the product code from the installed-programs entry:

$t = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object DisplayName -like "Eclipse Temurin JDK*21*"; $t.DisplayName; Start-Process msiexec.exe -Wait -ArgumentList "/x $($t.PSChildName) /qn /norestart"; Test-Path "C:\Program Files\Eclipse Adoptium\jdk-21\bin\java.exe"
Eclipse Temurin JDK with Hotspot 21.0.13+9 (x64)
False

Removing one procrun option means writing the list back without it, because --JvmOptions replaces the whole value:

$o = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\Tomcat10\Parameters\Java").Options | Where-Object { $_ -ne "-XX:-UseBASE64Intrinsics" }; C:\Tomcat\bin\tomcat10.exe //US//Tomcat10 "--JvmOptions=$($o -join ';')"
(Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\Tomcat10\Parameters\Java").Options
Restart-Service Tomcat10

Check that the printed options still hold Tomcat’s defaults before the restart; we did not capture that removal step in the lab.

Does winget install the fixed build?

It does for vendors that have shipped, but on Windows Server 2025 winget comes with App Installer and only registers at a user’s first interactive sign-in, so a fresh server reached over SSH or remoting has no winget command. Microsoft’s winget documentation covers the Microsoft.WinGet.Client module, which installs it from an elevated prompt:

Install-PackageProvider -Name NuGet -Force | Out-Null; Install-Module Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null; Repair-WinGetPackageManager -AllUsers -Latest

Watch the version column, because the winget package version is not the Java version, so a number that looks current can still be a vulnerable build. We installed Microsoft OpenJDK 17 at package version 17.0.21.21, which is the vulnerable 17.0.21.0.2 build, and winget list offered the upgrade:

winget list --id Microsoft.OpenJDK --accept-source-agreements --disable-interactivity
Name                                            Id                   Version     Available   Source
---------------------------------------------------------------------------------------------------
Microsoft Build of OpenJDK  17.0.21.0.2+1 (x64) Microsoft.OpenJDK.17 17.0.21.21  17.0.21.102 winget
Microsoft Build of OpenJDK  21.0.13.1+2 (x64)   Microsoft.OpenJDK.21 21.0.13.102             winget

One upgrade moved it to 17.0.21.1. Winget removed the old MSI and installed the new one in a single step, and the list shows no further update.

winget upgrade --id Microsoft.OpenJDK.17 --silent --accept-source-agreements --accept-package-agreements --disable-interactivity
Name                                          Id                   Version     Source
--------------------------------------------------------------------------------------
Microsoft Build of OpenJDK  17.0.21.1+2 (x64) Microsoft.OpenJDK.17 17.0.21.102 winget
Microsoft Build of OpenJDK  21.0.13.1+2 (x64) Microsoft.OpenJDK.21 21.0.13.102 winget

Other vendors’ packages vary, so check each one you use. On the same day winget show offered fixed Corretto and Zulu builds, a vulnerable Temurin and an Oracle package still on 21.0.12.

EclipseAdoptium.Temurin.21.JDK   Version: 21.0.13.9
Amazon.Corretto.21.JDK           Version: 21.0.13.1
Azul.Zulu.21.JDK                 Version: 21.54.201
Oracle.JDK.21                    Version: 21.0.12.0

Azul 21.54.201 is Java 21.0.13.1, and Corretto 21.0.13.1 is the fixed build. A plain winget upgrade does nothing for Temurin until Adoptium publishes Windows builds, and nothing for Oracle until its winget package catches up. For those two, download the fixed build from a vendor that has shipped, or keep the flag on until they do, because winget reporting no upgrade does not mean the runtime is safe.

How do you confirm the fix took?

Run the finder again. Every runtime should read fixed, and the running JVMs should point at the new folders. Anything still marked vulnerable is either a runtime you missed or a process that never restarted.

CPU features for the Base64 stub: avx512f, avx512bw, avx512_vbmi, bmi2 (4 of 4)
This CPU can run the vulnerable code path.

JavaHome : C:\Program Files\AcmeReports\jdk-17.0.21.1+2
Version  : 17.0.21.1
Vendor   : Microsoft
Verdict  : fixed
FoundBy  : process java (2644); disk scan

JavaHome : C:\Program Files\Microsoft\jdk-21.0.13.102-hotspot
Version  : 21.0.13.1
Vendor   : Microsoft
Verdict  : fixed
FoundBy  : process tomcat10 (672); procrun service Tomcat10; JAVA_HOME (Machine); PATH (Machine);
           installed: Microsoft Build of OpenJDK  21.0.13.1+2 (x64); disk scan

Running JVMs:

 PID Process  Jvm
 --- -------  ---
2644 java     C:\Program Files\AcmeReports\jdk-17.0.21.1+2\bin\server\jvm.dll
 672 tomcat10 C:\Program Files\Microsoft\jdk-21.0.13.102-hotspot\bin\server\jvm.dll

Calif’s trigger agreed on the fixed 21.0.13.1 build, NOT REPRODUCED in all five runs. That result only counts because the build string and the finder already say fixed; on its own a quiet run would prove nothing.

Before you close the change, work through this checklist on each server:

  1. The CPU line from the finder shows 4 of 4, or the host is out of scope and noted as such.
  2. Every JavaHome in the finder output reads fixed or not affected.
  3. Every running JVM in the finder output points at a fixed folder.
  4. jcmd reports 17.0.21.1, 21.0.13.1 or 25.0.5.1 or later for each service you restarted.
  5. Temurin hosts either moved to a fixed vendor or carry the flag, confirmed per process with jcmd.
  6. The stopgap comes out once the JVM is fixed: remove the machine-wide JAVA_TOOL_OPTIONS and any per-service flag.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch Security nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch GL.iNet Security Notice: Check Your Router for Malware and Update Networking GL.iNet Security Notice: Check Your Router for Malware and Update Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Security Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Configure SELinux Context for Podman Storage on Rocky Linux 10 / AlmaLinux 10 AlmaLinux Configure SELinux Context for Podman Storage on Rocky Linux 10 / AlmaLinux 10

Leave a Comment

Press ESC to close