Mitigate Java4Shell by disabling UseBASE64Intrinsics for Java 17 and later versions (#4400)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2026-11-17 18:08:00 -06:00
1 parent 99f8c589d3
commit 22613f0349
2 files changed
+14 -3

No files matched your search

+10 -3
View File
@@ -5,9 +5,7 @@
: "${USE_MEOWICE_GRAALVM_FLAGS:=false}"
: "${USE_MEOWICE_ZGC_FLAGS:=false}"
if isTrue "${USE_MEOWICE_FLAGS}" || isTrue "${USE_MEOWICE_GRAALVM_FLAGS}"; then
java_major_version=$(mc-image-helper java-release)
fi
java_major_version=$(mc-image-helper java-release)
if isTrue "${USE_MEOWICE_FLAGS}"; then
if [[ $java_major_version -gt 16 ]]; then
@@ -235,3 +233,12 @@ if isTrue "${USE_SIMD_FLAGS}"; then
--add-modules=jdk.incubator.vector
"
fi
# if java >= 17, mitigate Java4Shell exploit (CVE-2026-114938) by disabling UseBASE64Intrinsics with
# -XX:-UseBASE64Intrinsics
if [[ $java_major_version -ge 17 ]] && isTrue "${FIX_JAVA4SHELL_EXPLOIT:-true}"; then
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:-UseBASE64Intrinsics
"
log "Disabling UseBASE64Intrinsics to mitigate Java4Shell exploit (CVE-2026-114938)"
fi