On Amazon Linux 2023, dnf upgrade --cve CVE-2026-114938 reports “No security updates needed” while four vulnerable Corretto builds sit on the instance. The Java4Shell fixes shipped on 17 November 2026 as ALAS2023-2026-3478 to 3481 and ALAS2-2026-4123, and the advisory pages on alas.aws.amazon.com name the CVE, but the repository metadata dnf reads carries no CVE reference at all. A patch run that asks by CVE therefore leaves every JVM exposed and still exits 0.
Below, we patch Java4Shell on Amazon Linux 2023 and Amazon Linux 2 across Corretto 17, 21, 25 and 27, plus the two other quiet misses: instances locked to an older AL2023 release, and Corretto from Amazon’s own yum repository on AL2. The Java4Shell CVE-2026-114938 overview covers the bug and the JVMs bundled inside other products. All of it was tested in November 2026 on Amazon Linux 2023 and 2 instances with AVX-512 VBMI, so the vulnerable code path was live on every box we patched.
Fixed Corretto builds on Amazon Linux
Every Corretto line that upstream OpenJDK lists as affected has a fixed build in the Amazon Linux repositories today. The fixed builds carry a fourth version field of 1 (the .1.x builds), while the builds an instance patched on 16 November still runs end in .0.x. The table pairs the last vulnerable build with the fix and the advisory that ships it, from the Amazon Linux CVE-2026-114938 page and the repositories themselves:
| Release | Package | Last vulnerable build | Fixed build | Advisory |
|---|---|---|---|---|
| Amazon Linux 2023 | java-17-amazon-corretto | 17.0.21.0.11 | 17.0.21.1.2 | ALAS2023-2026-3478 |
| Amazon Linux 2023 | java-21-amazon-corretto | 21.0.13.0.11 | 21.0.13.1.2 | ALAS2023-2026-3479 |
| Amazon Linux 2023 | java-25-amazon-corretto | 25.0.5.0.10 | 25.0.5.1.2 | ALAS2023-2026-3480 |
| Amazon Linux 2023 | java-27-amazon-corretto | 27.0.1.0.11 | 27.0.1.1.4 | ALAS2023-2026-3481 |
| Amazon Linux 2 (core) | java-17-amazon-corretto | 17.0.21.0.11 | 17.0.21.1.2 | ALAS2-2026-4123 |
| Amazon Linux 2 (yum.corretto.aws) | java-21, 25 and 27 Corretto (-devel) | 21.0.13.0.11, 25.0.5.0.10, 27.0.1.0.11 | 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4 | None: the repo has no advisories |
Headless, devel and full JDK subpackages share one version, so a box is only clean when every Corretto package on it reaches the fixed build. Corretto 8 and 11 are not affected, which matches the OpenJDK advisory listing only Java 17, 21, 25 and 27. The row to worry about is the one missing from the table: Amazon marks java-26-amazon-corretto on AL2023 as “No Fix Planned”, along with 22, 23 and 24, and Corretto’s own repository has no fixed 26 build either. An instance on Corretto 26 has no package to install and has to move to 25 or 27.
Exposure on Intel, AMD and Graviton
Java4Shell lives in the Base64 decoder that HotSpot swaps in on x86-64 CPUs with AVX-512 VBMI, so the instance type decides whether the vulnerable code runs at all. Red Hat’s CVE entry names Intel Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids and AMD Zen 4 to 6 as the CPUs with that instruction set, and the m6i instances we tested on are Ice Lake. Graviton instances are arm64, and Amazon’s own CVE page says ARM64 systems are not affected. Check the CPU first:
grep -o -m1 -w avx512vbmi /proc/cpuinfo
Our m6i.large instances on Amazon Linux 2023 and Amazon Linux 2 both printed the flag. That puts them in the exposed group before any Java version is even checked.
avx512vbmi
A CPU with the flag is necessary, not sufficient, because each JVM decides at startup whether to use the AVX-512 decoder. A service started with the intrinsic disabled, or with -XX:UseAVX=2, is not running the vulnerable code, so ask the same java binary your service runs.
/usr/lib/jvm/java-21-amazon-corretto.x86_64/bin/java -XX:+PrintFlagsFinal -version 2>/dev/null | grep -E "UseBASE64Intrinsics|UseAVX "
Both lines below mark an exposed JVM. UseAVX = 3 means the AVX-512 code paths are on, and UseBASE64Intrinsics = true is the default the attack needs.
int UseAVX = 3 {ARCH product} {default}
bool UseBASE64Intrinsics = true {product} {default}
An empty grep for avx512vbmi lowers the urgency, not the need to patch. Auto Scaling groups, Spot fleets and instance type changes move a workload onto different silicon without anyone touching the AMI, so a JVM that is safe on an older instance type today can land on an m6i tomorrow.
Every Corretto build on the instance
A single java -version is the most common false negative here. It only reports the JDK the alternatives link points at, which on a box with several Corretto lines is the highest one, so list the packages instead.
rpm -qa "java-*-amazon-corretto*" | sort
Our Amazon Linux 2023 test box carried all four affected lines, each one build short of the fix. A box like this is common on build agents and shared hosts, where each team installs the Corretto line its project needs and nobody removes the old ones.
java-17-amazon-corretto-headless-17.0.21.0.11-1.amzn2023.1.x86_64
java-21-amazon-corretto-headless-21.0.13.0.11-1.amzn2023.1.x86_64
java-25-amazon-corretto-headless-25.0.5.0.10-1.amzn2023.1.x86_64
java-27-amazon-corretto-headless-27.0.1.0.11-1.amzn2023.1.x86_64
On that box the default java pointed at Corretto 27, so a check of java -version alone would have said nothing about the three older lines that services might start explicitly by path. Ask each one directly:
for v in 17 21 25 27; do /usr/lib/jvm/java-$v-amazon-corretto.x86_64/bin/java -version 2>&1 | sed -n 2p; done
Every runtime reports a .0.x build, so all four need the patch. Keep this loop handy, because the same command after the upgrade is the quickest proof that every line moved.
OpenJDK Runtime Environment Corretto-17.0.21.0.11 (build 17.0.21+11-LTS)
OpenJDK Runtime Environment Corretto-21.0.13.0.11 (build 21.0.13+11-LTS)
OpenJDK Runtime Environment Corretto-25.0.5.0.10 (build 25.0.5+10-LTS)
OpenJDK Runtime Environment Corretto-27.0.1.0.11 (build 27.0.1+11-FR)
Packages are only part of the inventory. Jenkins, Kafka, Elasticsearch and vendor appliances often ship their own JDK under /opt, and dnf never touches those. If you run Jenkins from our Jenkins on Amazon Linux 2023 guide it uses the system Corretto and this patch covers it, but anything with a bundled runtime needs the hunt in the overview article.
The dnf CVE filter that finds nothing
Amazon’s advisories themselves are fine. They sit in the repository metadata, and dnf matches all four against the installed builds when you list them without a filter.
sudo dnf updateinfo list
Each Corretto line gets one Important advisory pointing at its .1.x build. So the repository knows the instance is vulnerable, and the only question is how you ask it for the fix.
ALAS2023-2026-3478 Important/Sec. java-17-amazon-corretto-headless-1:17.0.21.1.2-1.amzn2023.1.x86_64
ALAS2023-2026-3479 Important/Sec. java-21-amazon-corretto-headless-1:21.0.13.1.2-1.amzn2023.1.x86_64
ALAS2023-2026-3480 Important/Sec. java-25-amazon-corretto-headless-1:25.0.5.1.2-1.amzn2023.1.x86_64
ALAS2023-2026-3481 Important/Sec. java-27-amazon-corretto-headless-1:27.0.1.1.4-1.amzn2023.1.x86_64
Now ask for the same fix the way most incident runbooks do, by CVE. We ran it with --assumeno so nothing would change, which is also a safe way to test your own patch command before trusting it.
sudo dnf upgrade --cve CVE-2026-114938 --assumeno
dnf reports a clean bill of health and exits 0. That is exactly what a patch script or an SSM Run Command document checks for, so the job goes green while four vulnerable JDKs stay on disk.
No security updates needed, but 4 updates available
Dependencies resolved.
Nothing to do.
Complete!
Look at the advisory itself for the reason. dnf’s --cve option matches the CVE references inside each updateinfo entry, and these four entries have none. Read one and look for a CVE line.
sudo dnf updateinfo info ALAS2023-2026-3479
No CVE line appears anywhere in the entry, only the advisory ID, its severity and a generic Corretto sentence with the version left blank. Any tool that maps CVEs to packages through this metadata draws the same blank, so treat a CVE-keyed result as unknown until the advisory IDs check out.
===============================================================================
Amazon Linux 2023 - ALAS2023-2026-3479: Important priority package update for java-21-amazon-corretto
===============================================================================
Update ID: ALAS2023-2026-3479
Type: security
Updated: 2026-11-17 09:00:00
Description: Amazon Corretto has been updated to , which includes fixes for security issues in the JDK. See the Corretto release notes for details
Severity: Important
Do not patch this one by CVE. Patch by the security flag, which takes every package named in a security advisory, or by the advisory ID itself; neither depends on the CVE references. The same gap exists on Amazon Linux 2, covered below.
Security upgrade on Amazon Linux 2023
Use the --security filter instead. It pulls every package with a pending security advisory and ignores the missing references. On a box that was patched the day before, that is just the Corretto builds.
sudo dnf upgrade --security
Before it asks to confirm, dnf lists all four fixed builds. Budget the download on small instances, because the headless packages alone come to about 400 MB.
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Upgrading:
java-17-amazon-corretto-headless x86_64 1:17.0.21.1.2-1.amzn2023.1 amazonlinux 91 M
java-21-amazon-corretto-headless x86_64 1:21.0.13.1.2-1.amzn2023.1 amazonlinux 97 M
java-25-amazon-corretto-headless x86_64 1:25.0.5.1.2-1.amzn2023.1 amazonlinux 109 M
java-27-amazon-corretto-headless x86_64 1:27.0.1.1.4-1.amzn2023.1 amazonlinux 110 M
Transaction Summary
=========================================================================================
Upgrade 4 Packages
Total download size: 407 M
To patch only one line, name its advisory instead. sudo dnf upgrade --advisory ALAS2023-2026-3479 selected Corretto 21 alone in our run and left the other three for a later window. That works on an instance already on release 2023.12.20261117; on an older one the same command finds nothing until you add the --releasever flag from the next section. After the upgrade, run the same loop over each runtime again:
for v in 17 21 25 27; do /usr/lib/jvm/java-$v-amazon-corretto.x86_64/bin/java -version 2>&1 | sed -n 2p; done
Every line now reports the fixed build from the table. Compare the fourth version field rather than the whole string, since a .1 there is what separates fixed from vulnerable on every Corretto line.
OpenJDK Runtime Environment Corretto-17.0.21.1.2 (build 17.0.21.1+2-LTS)
OpenJDK Runtime Environment Corretto-21.0.13.1.2 (build 21.0.13.1+2-LTS)
OpenJDK Runtime Environment Corretto-25.0.5.1.2 (build 25.0.5.1+2-LTS)
OpenJDK Runtime Environment Corretto-27.0.1.1.4 (build 27.0.1.1+4-FR)
Those versions prove the files on disk, not the processes in memory, so do not close anything yet. JVMs that were already running are still on the old build until they restart, which the section on running JVMs handles.
The release lock on older AL2023 AMIs
Amazon Linux 2023 pins each instance to the release recorded by its system-release package (the AMI’s release until you move it), and new packages only appear in new releases. The fixed Corretto builds arrived in release 2023.12.20261117, so an instance launched from an earlier AMI cannot see them with a plain upgrade. We booted one from the 12 November AMI and installed Corretto 21 to show it:
cat /etc/system-release
rpm -q java-21-amazon-corretto-headless
Corretto 21 on that release tops out at the vulnerable build, so the instance was fully up to date by its own standard and still exposed. Instances like this are everywhere: anything launched from an AMI older than 17 November and patched in place since.
Amazon Linux release 2023.12.20261112 (Amazon Linux)
java-21-amazon-corretto-headless-21.0.13.0.11-1.amzn2023.1.x86_64
Run the security upgrade that worked on the newer box, and it finds nothing to install.
sudo dnf upgrade --security --assumeno
dnf prints a banner about a newer release and then “Nothing to do”. In a cron log or an SSM output that banner is easy to read as noise, and the exit code is 0 again.
================================================================================
WARNING:
A newer release of "Amazon Linux" is available.
Available Versions:
Version 2023.12.20261117:
Run the following command to upgrade to 2023.12.20261117:
dnf upgrade --releasever=2023.12.20261117
Release notes:
https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.12.20261117.html
================================================================================
Dependencies resolved.
Nothing to do.
Complete!
Pointing dnf at the latest release for this run makes the fixed build visible. It does not move the instance’s lock, which is set by the installed system-release package, and a security-only run leaves that package alone.
sudo dnf upgrade --releasever=latest --security
Now the fixed Corretto build appears, and so does a second package, because the instance is reading the newer release’s repository for this run. Expect more than one extra package on an older box, since every security update published between the two releases comes along.
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Upgrading:
java-21-amazon-corretto-headless x86_64 1:21.0.13.1.2-1.amzn2023.1 amazonlinux 97 M
rsync x86_64 3.5.2-1.amzn2023.0.1 amazonlinux 478 k
Transaction Summary
=========================================================================================
Upgrade 2 Packages
Total download size: 97 M
We applied that run for real and then checked the lock. rpm -q system-release still reported 2023.12.20261112, dnf check-release-update still printed the newer-release banner, and a plain dnf upgrade afterwards still read the old snapshot. Corretto was fixed, the instance was not moved. Pick the route that matches how the fleet is managed, as AWS’s deterministic upgrades documentation describes:
- A one-off instance takes
--releasever=latest --securityfor this run and keeps its old lock. - A fleet takes a full
dnf upgrade --releasever=2023.12.20261117from the banner in its change window, which movessystem-releaseand the lock, so every node lands on the same snapshot. - Every AMI baked before 17 November is rebuilt, or the next instance an Auto Scaling group launches comes up vulnerable.
Rebuilding the AMI is the step teams skip, and it is the one that undoes the other two a week later when capacity scales out.
Amazon Linux 2 and the Corretto repository
Of the affected lines, Amazon Linux 2 carries only Corretto 17 in its core repository, with the fix in ALAS2-2026-4123. The CVE filter misses it here as well. On a box with the vulnerable build installed, yum lists the advisory but drops it when asked by CVE:
sudo yum update --cve CVE-2026-114938 --assumeno
yum even prints which packages it removed from consideration before reporting that nothing is needed. Those “removed (updateinfo)” lines are the tell to look for in your own patch logs.
--> 1:java-17-amazon-corretto-headless-17.0.21.0.11-1.amzn2.1.x86_64 from @amzn2-core removed (updateinfo)
--> 1:java-17-amazon-corretto-headless-17.0.21.1.2-1.amzn2.1.x86_64 from amzn2-core removed (updateinfo)
No packages needed for security; 1 packages available
Resolving Dependencies
Asked by the security flag, yum finds the same advisory without trouble. Use that form for the core repository and keep CVE filters out of the runbook.
sudo yum update --security
yum selects one package for security, the Corretto 17 build from ALAS2-2026-4123. On a box that also runs Corretto from the side repository, that one package is all a security-only run will ever touch.
1 package(s) needed (+0 related) for security, out of 1 available
Resolving Dependencies
--> Running transaction check
---> Package java-17-amazon-corretto-headless.x86_64 1:17.0.21.0.11-1.amzn2.1 will be updated
---> Package java-17-amazon-corretto-headless.x86_64 1:17.0.21.1.2-1.amzn2.1 will be an update
Corretto 21, 25, 26 and 27 on Amazon Linux 2 come from Amazon’s separate repository at yum.corretto.aws, which ships only the -devel packages and publishes no security advisories at all. A security-only patch run skips those packages completely. With Corretto 21 installed from it, we saw yum update --security drop the Corretto 21 update (“removed (updateinfo)”) and patch only Corretto 17. Check that repository by name:
sudo yum check-update "java-21*"
A fixed build is waiting there, and only a plain update installs it. Patch tooling keyed on advisories skips it too: Patch Manager only classifies packages that appear in an update notice, so these are never classified as Security, and they are only considered at all when the baseline includes non-security updates and an approval rule matches them.
java-21-amazon-corretto-devel.x86_64 1:21.0.13.1.2-1 AmazonCorretto
Update each line by name. The repository only ships java-<N>-amazon-corretto-devel, so one command per installed line is the whole fix, and Corretto 27 from the same repository has its fixed build there too. Corretto 26 does not, so a box on 26 needs to move to 25 or 27.
sudo yum update java-21-amazon-corretto-devel
After both updates, the package list on our Amazon Linux 2 box showed Corretto 17 and 21 on fixed builds. Corretto 11 stayed where it was, which is correct because 11 is not affected.
java-11-amazon-corretto-headless-11.0.33.0.10-1.amzn2.x86_64
java-17-amazon-corretto-headless-17.0.21.1.2-1.amzn2.1.x86_64
java-21-amazon-corretto-devel-21.0.13.1.2-1.x86_64
On Amazon Linux 2, Corretto 21 and later were always a side repository with no advisory feed behind them, so a security-only patch policy never covered them. Amazon already labels ALAS2-2026-4123 an Amazon Linux 2 (EOS) advisory, and if your AL2 fleet runs Java 21, 25 or 27, this incident is a good reason to move it to AL2023, where every supported Corretto line gets an advisory. Our Java 21 on Amazon Linux 2023 guide covers the install there.
JVMs still running the old build
An RPM upgrade replaces files on disk, but a JVM that started before it keeps the old libjvm.so mapped and stays exploitable until it restarts. We ran a small service called orders-api on Corretto 21 that decodes Base64 at startup, upgraded underneath it, and then looked for the stale runtime. The kernel marks a replaced library as deleted in the process maps:
sudo grep -l "libjvm.so (deleted)" /proc/[0-9]*/maps 2>/dev/null
One process still maps the old JVM library, even though rpm -q already reports the fixed build. That process is still running the vulnerable decoder, because the code it executes was loaded before the upgrade.
/proc/26813/maps
A process ID is hard to act on across a fleet. needs-restarting from dnf-utils turns it into service names, which is what you actually restart, and on AL2 the same command comes from yum-utils.
sudo dnf install -y dnf-utils
sudo needs-restarting -s
Only one unit is still on the vulnerable build here. On a real host expect several, since every Java service that was up during the upgrade shows in this list.
orders-api.service
Restart it in the change window, because the restart is the moment the patched libjvm.so actually loads. Then check the binary behind the new process, so you read the running JVM rather than the package database, which already said the box was fixed before the restart and was wrong about the process.
sudo systemctl restart orders-api
P=$(systemctl show -p MainPID --value orders-api)
echo "pid $P $(sudo readlink /proc/$P/exe)"
Now the path no longer ends in “(deleted)”, and needs-restarting -s returns an empty list after the restart.
pid 26942 /usr/lib/jvm/java-21-amazon-corretto.x86_64/bin/java
Plan the restarts as part of the patch, not after it. A Jenkins controller, a Keycloak node or a Kafka broker left running on the old build is the exact exposure the advisory describes, whatever rpm -q says.
The amazoncorretto container images
The official amazoncorretto images on Docker Hub were rebuilt late on 17 November, and the floating tags already carry the fix. We pulled them on the lab instance and asked each one for its runtime rather than trusting the tag date.
for t in 17 21 25 21-alpine 8; do printf "amazoncorretto:%-10s " $t; sudo docker run --rm amazoncorretto:$t java -version 2>&1 | grep -E "Runtime Environment"; done
All of the 17, 21 and 25 tags, including Alpine, report fixed builds. Tag 8 is on a line that was never affected.
amazoncorretto:17 OpenJDK Runtime Environment Corretto-17.0.21.1.2 (build 17.0.21.1+2-LTS)
amazoncorretto:21 OpenJDK Runtime Environment Corretto-21.0.13.1.2 (build 21.0.13.1+2-LTS)
amazoncorretto:25 OpenJDK Runtime Environment Corretto-25.0.5.1.2 (build 25.0.5.1+2-LTS)
amazoncorretto:21-alpine OpenJDK Runtime Environment Corretto-21.0.13.1.2 (build 21.0.13.1+2-LTS)
amazoncorretto:8 OpenJDK Runtime Environment Corretto-8.514.01.1 (build 1.8.0_514-b01)
A fixed base image does nothing for images already built on the old one. Anything pinned by digest, or built before the rebuild, keeps the vulnerable JDK until you rebuild it with --pull and redeploy, and running containers keep the old runtime until they are replaced. ECS tasks and EKS pods count as running containers here.
Stopgap for Corretto 26 and bundled JDKs
When no fixed build exists for the JDK a service runs, such as Corretto 26 or a runtime bundled by a vendor, disable the vulnerable intrinsic for that service until it can move, which is the interim mitigation in Red Hat’s RHSB-2026-018 bulletin. Ubuntu hosts in the same fleet take the same flag, and the fixed OpenJDK builds for each release are in our Ubuntu OpenJDK patch notes. The flag takes effect at JVM start, so it costs a restart just like the patch. A systemd drop-in keeps it out of the vendor’s unit file:
sudo mkdir -p /etc/systemd/system/orders-api.service.d
echo -e "[Service]\nEnvironment=JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics" | sudo tee /etc/systemd/system/orders-api.service.d/java4shell.conf
sudo systemctl daemon-reload
sudo systemctl restart orders-api
Every JVM announces JAVA_TOOL_OPTIONS on stderr at start, so the journal is the proof the drop-in reached the process. Check it on each service you touch, because a wrapper script that sets its own JAVA_TOOL_OPTIONS replaces ours and the JVM starts with the intrinsic back on.
journalctl -u orders-api --no-pager -n 2 -o cat
Right after the start line, the JVM confirms it picked up the option. No such line means the drop-in never reached the process, usually because the unit name or path was wrong.
Started orders-api.service - Orders API.
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
A journal line proves the option arrived, not that the JVM accepted it. Run the same JDK with the same environment and print the flag’s final value.
JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics /usr/lib/jvm/java-21-amazon-corretto.x86_64/bin/java -XX:+PrintFlagsFinal -version 2>&1 | grep -E "Picked up|UseBASE64Intrinsics"
Now the intrinsic is off, and the source column says it came from the environment rather than from a default.
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
bool UseBASE64Intrinsics = false {product} {environment}
Treat the flag as temporary. It slows Base64 work down, and a service whose own start script overwrites JAVA_TOOL_OPTIONS silently loses it, so check the journal line on every service you apply it to. Remove the drop-in once the service runs on a fixed build.
Audit checklist after the patch
A patch run that exits 0 proves very little on Amazon Linux this week, because all three quiet misses above exit 0. So close the ticket on evidence from the instance itself, not on the job status. These are the conditions that should all hold on every instance before you do:
rpm -qa "java-*-amazon-corretto*"shows only.1.xbuilds for 17, 21, 25 and 27, or lines that were never affected.- No patch job, SSM document or runbook step relies on
dnf upgrade --cveoryum update --cvefor this fix. - Every AL2023 instance that still prints the newer-release banner from
dnf check-release-updatehas its Corretto packages on.1.xanyway, and a release upgrade or new AMI on the calendar. - Corretto 21, 25 and 27 from yum.corretto.aws on AL2 were updated by name, not by a security-only run.
sudo needs-restarting -sreturns nothing, and no process mapslibjvm.so (deleted).- Every AMI and container image in use was rebuilt after 17 November.
- Any service left on Corretto 26 or a bundled JDK logs
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsicsat start.
Item 2 is the one most teams will fail, because a CVE-keyed patch run is exactly what an incident ticket asks for. Fix the runbook along with the instances, and the next Corretto advisory without CVE references will not slip past the same way.