Skip to content

Upgrade to JDK 21.0.13.1 to fix CVE-2026-114938, add a variable containing the full JDK build version - #100

Open
Acriss wants to merge 2 commits into
dev/21/locked-ci-workflowfrom
security/21/java4shell-stopgap
Open

Acriss wants to merge 2 commits into
dev/21/locked-ci-workflowfrom
security/21/java4shell-stopgap

Conversation

@Acriss

@Acriss Acriss commented Nov 18, 2026 •

Copy link
Copy Markdown

The 21 line of #99.

Stacked on #101, which makes the 21 line's CI run and publish again. Merge #101 first: this PR then targets 21.

Why

Same as #99: CVE-2026-114938 ("Java4Shell") is fixed in JDK 21.0.13.1 (advisory), along with other CVEs.

Parked until Temurin publishes 21.0.13.1 on all 5 platforms

Temurin has started publishing 21.0.13.1+2, but not yet for every platform this package ships (macOS x64 and Linux aarch64 are still on 21.0.13+9). We release once all 5 wheels can bundle it. Until then, the build fails at setup-java on the platforms that lack it: re-run CI once they all have it, and merge. The 3 other platforms (Linux x64, macOS arm64, Windows x64) already pass with 21.0.13.1+2.

What

Two commits, as in #99:

  1. Expose the exact JDK version as JAVA_FULL_VERSION. The version 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 "21.0.13.1+2", copied into the runtime's release file at build time (see Upgrade to JDK 25.0.5.1 to fix CVE-2026-114938 #99). The README explains the numbers and maps each release to its JDK build.
  2. JDK 21.0.13.1, released as 21.0.13.1, built from Temurin 21.0.13.1+2 (TEMURIN_VERSION in ci.yaml, see Run the 21 line's CI in one locked workflow #101). The line 21.0.13 starts at .1 rather than .0, so that the release reads like the JDK it bundles rather than the vulnerable 21.0.13.

Before merging

  • The pypi environment only deploys from protected branches, and 21 is not protected: the publish job will be refused until it is.

Tested

Locally with a JDK 21 (21.0.11+10): ruff, ty, and JAVA_FULL_VERSION == "21.0.11+10" read from the built runtime. CI covers the Temurin build itself.

Merging into 21 publishes 21.0.13.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 (21 line) Upgrade to JDK 21.0.13.1 to fix CVE-2026-114938 (21 line) Nov 18, 2026
@Acriss
Acriss changed the base branch from 21 to dev/21/locked-ci-workflow November 19, 2026 13:26
@Acriss
Acriss force-pushed the security/21/java4shell-stopgap branch 4 times, most recently from 01ed401 to d145794 Compare November 19, 2026 14:28
@Acriss
Acriss marked this pull request as ready for review November 19, 2026 14:52
Comment thread README.md Outdated
Comment on lines +22 to +24
(21, 0, 13)
>>> JAVA_FULL_VERSION
(21, 0, 13, 1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non breaking

Comment thread README.md Outdated

| jdk4py | JDK |
| --------- | --------- |
| 21.0.13.1 | 21.0.13.1 |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure which one to do

Suggested change
| 21.0.13.1 | 21.0.13.1 |
| 21.0.13.0 | 21.0.13.1 |

@Acriss Acriss changed the title Upgrade to JDK 21.0.13.1 to fix CVE-2026-114938 (21 line) Upgrade to JDK 21.0.13.1 to fix CVE-2026-114938, add a variable containing the full JDK build version Nov 19, 2026
Acriss and others added 2 commits November 19, 2026 16:25
`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
21.0.13.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 21.0.13.1 fixes CVE-2026-114938 ("Java4Shell"). It is released as
jdk4py 21.0.13.1: `JAVA_VERSION` is `(21, 0, 13)` and `JAVA_FULL_VERSION`
is `"21.0.13.1+2"`. CI bundles Temurin 21.0.13.1+2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Acriss
Acriss force-pushed the security/21/java4shell-stopgap branch from d145794 to 85ee3a6 Compare November 19, 2026 15:26

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