← Resource hub

Find and fix Java4Shell across thousands of repos with GitHub Copilot and Moderne

Java4Shell (CVE-2026-114938) is a critical flaw in the JVM's Base64 decoder, and scanners that only check your dependencies can miss it. Watch GitHub Copilot find and fix it across nearly 30,000 repositories with Moderne recipes.

Java4Shell affects Java 17.0.6 and later on x86-64 servers with AVX-512 VBMI. The bug is in the Java runtime itself, so if you run Java across hundreds or thousands of repositories, you need another way to tell which services are exposed.

In this demo, we run mod copilot chat from the Moderne CLI and point Copilot at every repository in our Moderne tenant. Copilot finds the two Java4Shell recipes in Moderne and runs them both:

  • Find: flags Base64 decode calls that take input from an HTTP request. It also identifies the JDK each repository was built with and the container images that may be affected. Results came back in 2,630 repositories.
  • Remediate: changed 977 files across 474 repositories. It upgrades Amazon Corretto images from Docker Hub to a patched build. For other common OpenJDK images, like Temurin and Zulu, it adds a temporary JVM flag until you can patch.

Each changed file has a change reason, and every change stays in Moderne until you review it. From the change set, you can commit the changes or open pull requests in every affected repository at once. The recipes don’t cover internal base images, so update those yourself or have Copilot write a recipe for them. Then rebuild, restart and confirm the patched build is running.

Java4Shell won’t be the last vulnerability like this. With Moderne, your coding agent can run recipes that find and fix the next one across every repository you have.