SECURITY KNOWLEDGE BASE

Vulnerability hub / Java platform

Make the JDK patch decision with confidence.

A practical starting point for Java security triage: understand a real JDK CVE, find authoritative current advisories, and move from inventory to verified remediation.

Featured JDK vulnerability

CVE-2022-21449

ECDSA signature verification flaw

CVE-2022-21449, often nicknamed “Psychic Signatures,” affected Java’s ECDSA signature verification in certain releases. A crafted invalid signature could be incorrectly accepted in affected configurations, undermining the expected verification guarantee.

Affected range

Confirm vendor/build

Oracle’s April 2022 CPU covers the affected product and release details.

Fixed releases

17.0.3 · 18.0.1

Use the vendor advisory to verify exact platform fixes and backports.

Primary action

Upgrade and retest

Prioritize code paths that rely on ECDSA signature verification.

From finding to fixed

JDK remediation, step by step

A repeatable workflow for engineering and security teams. Adapt validation and rollout controls to your organization’s risk process.

  1. 01

    Inventory every Java runtime

    Find JDKs and JREs across hosts, containers, serverless functions, build agents, and developer images. Record vendor, exact version, architecture, support status, and the application that owns each runtime.

  2. 02

    Match the CVE to your exact build

    Read the vendor advisory, not just a CVE headline. Check the affected product, update train, platform, configuration prerequisites, and fixed release. A version string alone may not identify vendor backports.

  3. 03

    Prioritize exposure and impact

    Rank internet-facing services, systems that process untrusted input, cryptographic use, and known-exploited entries first. Consider CVSS alongside reachability, business impact, and CISA KEV status.

  4. 04

    Upgrade to a supported fixed release

    Choose the latest supported CPU/PSU or vendor-maintained JDK release that includes the fix. Upgrade the runtime and the base container image; rebuild and redeploy rather than only patching a running host.

  5. 05

    Test application compatibility

    Run unit, integration, security, and performance tests against the candidate JDK. Verify TLS, signing, serialization, native/JNI dependencies, startup flags, and monitoring before staged rollout.

  6. 06

    Use mitigations only as a bridge

    If immediate patching is impossible, apply only vendor-documented mitigations, limit exposure, and document an owner and expiry date. Do not disable cryptographic or JVM protections without a security review.

  7. 07

    Verify and prevent recurrence

    Confirm the deployed runtime reports the fixed build, rescan images and hosts, check that old artifacts are no longer deployable, and add JDK inventory plus dependency/image scanning to CI and release controls.

Closure evidence: keep the advisory, affected asset list, chosen fixed build, test and rollout results, scanner output, and any approved exceptions together in the ticket or incident record.

Choose the Java line first

Version-by-version upgrade paths

Java patch numbers and support terms are vendor-specific. Apply the latest fixed build for your exact distribution and platform; these image tags are major-line examples, not immutable production pins.

Runtime lineSupport classRemediation directionExample runtime image
Java 8LTS · legacy baselineStay on the latest vendor-supported 8u security build while planning an application-tested move to 21 or 25. Confirm your vendor still publishes updates for your use case.eclipse-temurin:8-jre
Java 11LTS · legacy baselineApply the latest vendor-supported 11.0.x security update. Test frameworks, libraries, TLS, and removed/deprecated APIs before moving to 21 or 25.eclipse-temurin:11-jre
Java 17LTSInstall the latest vendor-supported 17.0.x update. Oracle Premier Support ended in September 2026; support and patch availability differ by vendor.eclipse-temurin:17-jre
Java 21LTSMove to the latest vendor-supported 21.0.x security update. This is a practical target for teams migrating from 8, 11, or 17.eclipse-temurin:21-jre
Java 25LTS · currentUse the latest vendor-supported 25.0.x security update for new or already-compatible services. Verify application and framework support first.eclipse-temurin:25-jre
Java 27Non-LTS · short cycleThe current feature release has a shorter support window. Follow the selected vendor’s release schedule and plan the next feature release or an LTS migration.Use a vendor-supported 27 image
Java 26 and earlier non-LTSUsually supersededThis includes 9–10, 12–16, 18–20, 22–24, and 26. Treat superseded feature releases as unsupported unless your vendor explicitly maintains them; move to a supported LTS or current feature release.Choose a currently maintained vendor image
Java 7 and olderLegacy · high riskThese lines are end-of-life for most vendors. Upgrade the application to a supported LTS; if a short transition is unavoidable, isolate the service and document a dated exception.No current upstream image recommended

Oracle's roadmap identifies 8, 11, 17, 21, and 25 as LTS and currently lists Java 27 as the active non-LTS feature release. This is Oracle-specific guidance; other vendors can have different maintenance windows, builds, and licensing terms. Java 7 and older require a supported migration path rather than assuming a new upstream fix exists.

Apply the fix where Java actually runs

Deployment recipes and code changes

Replace the example version with your approved fixed build. For production, publish and deploy a reviewed image digest so rollbacks and rescans refer to one exact artifact.

Linux server or VM with systemd

Install the vendor-fixed JDK side-by-side, switch the service to its explicit path, then restart and verify the running process.

[Service]
Environment="JAVA_HOME=/opt/java/current"
Environment="PATH=/opt/java/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
ExecStart=
ExecStart=/opt/java/current/bin/java -jar /srv/myapp/app.jar

# After editing the service drop-in; preserve your existing JVM flags and arguments
sudo systemctl daemon-reload
sudo systemctl restart myapp
sudo systemctl status myapp --no-pager
/opt/java/current/bin/java -version
Docker image

Rebuild from a maintained JDK/JRE base image; do not patch only a running container. Set JAVA_MAJOR to 8, 11, 17, 21, or 25 as appropriate.

ARG JAVA_MAJOR=21
FROM eclipse-temurin:${JAVA_MAJOR}-jdk AS build
WORKDIR /src
COPY . .
RUN ./mvnw -B verify

FROM eclipse-temurin:${JAVA_MAJOR}-jre AS runtime
WORKDIR /app
COPY --from=build /src/target/myapp.jar /app/myapp.jar
USER 10001:10001
ENTRYPOINT ["java", "-jar", "/app/myapp.jar"]

# Build using the same supported major line for build and runtime
docker build --build-arg JAVA_MAJOR=21 -t registry.example.com/myapp:java21 .
Kubernetes Deployment / Pod

Roll out a newly rebuilt, scanned image by immutable digest. The writable /tmp volume is needed when using a read-only root filesystem.

spec:
  template:
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 10001
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: app
          image: registry.example.com/myapp@sha256:<approved-image-digest>
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop: ["ALL"]
          env:
            - name: JAVA_TOOL_OPTIONS
              value: "-Djava.io.tmpdir=/tmp"
          volumeMounts:
            - name: tmp
              mountPath: /tmp
          resources:
            requests: { cpu: "250m", memory: "512Mi" }
            limits: { cpu: "1", memory: "1Gi" }
      volumes:
        - name: tmp
          emptyDir: {}

# Apply the manifest, then confirm the rollout and actual runtime
kubectl apply -f deployment.yaml
kubectl rollout status deployment/myapp -n production
kubectl exec deployment/myapp -n production -c app -- java -version
Build pipeline and Java matrix

Build and test each Java line you claim to support; deploy only the selected, reviewed image. Keep CI action versions aligned with your organization’s pinning policy.

jobs:
  test:
    strategy:
      matrix:
        java: ['8', '11', '17', '21', '25']
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-java@v6
        with:
          distribution: temurin
          java-version: ${{ matrix.java }}
      - run: java --version
      - run: ./mvnw -B verify
Gradle toolchain (or equivalent Maven toolchain)

Declare the JDK used to compile and test instead of relying on whichever Java happens to be first on PATH. Set the major to the tested target line.

// build.gradle.kts
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

tasks.withType<JavaCompile>().configureEach {
    options.release = 21
}

// For Maven, use maven-toolchains-plugin and select a vendor/version
// in toolchains.xml; keep compiler release/target aligned with app support.

Windows services

Install the fixed JDK side-by-side, update the service wrapper (such as WinSW or NSSM) to point at the new java.exe or JAVA_HOME, then restart and verify the service's actual process. Do not rely on an interactive user's PATH or the system-wide Java association.

App servers and serverless runtimes

For Tomcat, application-server distributions, functions, and managed platforms, update the runtime configured by that service or platform—not only the developer JDK. Rebuild custom runtimes, check framework/vendor compatibility, and roll out through the platform's staged deployment mechanism.

Primary references

Check the source of truth

Use vendor advisories to determine product-specific impact and fixed versions. Use NVD and CISA as complementary triage sources.

Explore related coverage in Security articles.