Java4Shell (CVE-2026-114938) and Azure Functions for Java

Offen Anfängerfreundlich
#909 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
74/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
azure, java
Bereich
cloud, security

Rechercherichtung

Das Issue beschreibt die JVM-Flags des Java-Workers und verweist auf worker.config.json sowie die Java-Entwicklerreferenz. Prüfe zunächst diese Standardwerte und die Hinweise anhand des verlinkten OpenJDK-Sicherheitshinweises. Bestätige anschließend, dass die dokumentierten Abhilfeschritte und planspezifischen Einstellungen korrekt sind. Das Ziel ist erreicht, wenn Leser erkennen können, wann der Worker C2 verwenden kann, wie sich das Risiko verringern lässt und wie sich die JVM-Flags überprüfen lassen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

CVE-2026-114938 is an OpenJDK Base64 decoder bug that can lead to a crash or remote code execution. It affects unpatched Java 17 from 17.0.6 onward, Java 21 and Java 25, on x86-64 CPUs with AVX-512 VBMI. For an attack, malicious Base64 input must reach the affected C2 intrinsic.

Default configuration is not exposed

The Java worker starts the JVM with -XX:+TieredCompilation -XX:TieredStopAtLevel=1, so only the C1 compiler runs. C1 does not call the vulnerable C2 Base64 intrinsic.

  • Source: in OpenJDK 17u, 21u and 25u, the built-in C2 compiler calls the vulnerable decoder. C1 uses only intrinsics on an allowlist, and Base64 isn't on it.
  • Azure: we tested Microsoft builds on Functions hosts with AVX-512 VBMI. Child JVMs used the worker's default flags or enabled C2.
Java Plan CPU Worker defaults C2 enabled
17.0.21 Flex Consumption Intel Xeon 8370C Not used Used
21.0.13 Flex / Linux Consumption EPYC 9V74 / Xeon 8573C Not used Used
25.0.5 Flex Consumption Intel Xeon 8573C Not used Used

“Used” means the JVM reported using the Base64 decode intrinsic. We did not reproduce memory corruption. Our Premium and Windows samples ran on CPUs without VBMI, but hosts vary. Do not assume a particular CPU across hosting plans.

When you are exposed

JAVA_OPTS and languageWorkers__java__arguments are both added after the worker defaults. Either setting is safe by itself. However, conflicting options in either setting, such as -XX:TieredStopAtLevel=4 or -XX:-TieredCompilation, can enable C2 and make an app potentially vulnerable when the other conditions above are met. _JAVA_OPTIONS can also override the defaults.

What to do
  1. Update the JDK to a vendor-fixed build when available. For managed runtimes, check Azure's rollout status. Custom containers need a rebuild and redeploy.
  2. If you changed the JVM options, remove the options that enable C2, or add -XX:+TieredCompilation -XX:TieredStopAtLevel=1 after conflicting options. Preserve your other options. This may lower peak throughput.
  3. To keep C2, add -XX:-UseBASE64Intrinsics on a JDK that supports it. Base64 decoding may be slower. An unsupported option can prevent startup, so verify it on your runtime.
  4. Check the running worker, where jcmd is available, with jcmd <pid> VM.version and jcmd <pid> VM.flags -all. Check for both TieredStopAtLevel=1 and TieredCompilation=true, or UseBASE64Intrinsics=false.

Changing app settings restarts the app. Use languageWorkers__java__arguments for Consumption plans and JAVA_OPTS for Premium and Dedicated plans. See the Java developer reference.

For details, see the OpenJDK advisory and Datadog's analysis.

Vorherrschende Sprache
Java
Sterne
103
Forks
75
Ø Merge
10 T. 9 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Azure/azure-functions-java-worker

Alle Issues in Azure/azure-functions-java-worker

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.