Skip to content

Upgrade to JDK 25.0.5.1 to fix CVE-2026-114938 - #99

Open
Acriss wants to merge 3 commits into
mainfrom
security/java4shell-stopgap
Open

Acriss wants to merge 3 commits into
mainfrom
security/java4shell-stopgap

Conversation

@Acriss

@Acriss Acriss commented Nov 18, 2026 •

Copy link
Copy Markdown

Why

CVE-2026-114938 ("Java4Shell", CISA alert, write-up): on x86-64 CPUs with AVX-512 VBMI (Intel Ice Lake and later, AMD Zen 4 and later), the HotSpot Base64 decoding intrinsic writes past the end of its output array on malformed input such as 64 A followed by =. The researchers reached unauthenticated remote code execution through ordinary features such as HTTP Basic authentication.

OpenJDK fixed it in 25.0.5.1 (advisory), along with 9 other CVEs.

What

Three commits:

  1. Pin the exact Temurin build in CI. ci.yaml names the build in full (TEMURIN_VERSION). Before, a request for 25.0.5 was served from the JDK preinstalled on the ubuntu-24.04 and windows-2025 runners (Resolved Java 25.0.5+8 from tool-cache), without asking Adoptium. With an exact build, setup-java installs that build or fails with "version not found".
  2. Expose the exact JDK version as JAVA_FULL_VERSION. The version scheme keeps its 4 numbers: the first 3 are the JDK line (JAVA_VERSION, unchanged), the fourth counts the jdk4py releases in that line. JAVA_FULL_VERSION is the exact JDK version with its build number, as a string such as "25.0.5.1+2". jlink drops the build number from the release file it writes, so build_java_runtime.py copies JAVA_RUNTIME_VERSION from the source JDK with --release-info, and JAVA_FULL_VERSION reads it back without the -LTS suffix. The README explains the numbers and maps each release to its JDK build.
  3. JDK 25.0.5.1, released as 25.0.5.1, built from Temurin 25.0.5.1+2.

JAVA_VERSION stays a 3-tuple, so nothing changes for code that reads it.

Tested

  • Locally on Linux x86-64 with JDK 25.0.5.1+2: ruff, ty, prettier, and pytest (7 passed, with JAVA_VERSION == (25, 0, 5) and JAVA_FULL_VERSION == "25.0.5.1+2", checked against the (build ...) line of java -version).
  • CI on all 5 platforms (Linux x64 and aarch64, macOS x64 and arm64, Windows x64): each job downloads 25.0.5+100000002.0.LTS (25.0.5.1+2) from Adoptium, pytest passes (7 tests), and the wheel's java -version prints Temurin-25.0.5.1+2.
  • Before Temurin had published every platform, the jobs of the missing ones failed at setup-java with No matching version found for SemVer '25.0.5+1.2', rather than falling back to the JDK preinstalled on the runner.

Merging publishes 25.0.5.1 to PyPI.

🤖 Generated with Claude Code

@Acriss
Acriss marked this pull request as draft November 18, 2026 13:44
@Acriss Acriss changed the title Turn off the Base64 intrinsics to mitigate CVE-2026-114938 Upgrade to JDK 25.0.5.1 to fix CVE-2026-114938 Nov 18, 2026
setup-java took the JDK preinstalled on the ubuntu-24.04 and windows-2025
runners whenever it matched the requested version, without asking Adoptium.
CI now names the exact Temurin build (25.0.5+8), which setup-java installs or
fails on: a wheel can no longer bundle another build with the same version
numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Acriss
Acriss force-pushed the security/java4shell-stopgap branch from cda0ab0 to a83d16d Compare November 19, 2026 14:29
Acriss and others added 2 commits November 19, 2026 16:24
`JAVA_VERSION` keeps the first 3 numbers of the JDK version, taken from the
package version: its fourth number counts the jdk4py releases of the line.

`JAVA_FULL_VERSION` is the exact JDK version with its build number, such as
25.0.5.1+2. jlink only keeps the version without the build number in the
`release` file it writes, so `build_java_runtime.py` copies
`JAVA_RUNTIME_VERSION` from the source JDK's `release` file with
`--release-info`. `JAVA_FULL_VERSION` reads it on first access and drops the
optional suffix, such as `-LTS`.

The README documents what each version number means and which JDK build each
release bundles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JDK 25.0.5.1 fixes CVE-2026-114938 ("Java4Shell"). It is released as
jdk4py 25.0.5.1: `JAVA_VERSION` is `(25, 0, 5)` and `JAVA_FULL_VERSION`
is `"25.0.5.1+2"`. CI bundles Temurin 25.0.5.1+2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Acriss
Acriss force-pushed the security/java4shell-stopgap branch from a83d16d to 353598b Compare November 19, 2026 15:24
@Acriss
Acriss marked this pull request as ready for review November 20, 2026 13:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant