Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 15 min read How-to mediumAdept

Docker patches Java4Shell and the NGINX HTTP/2 with Docker Hardened Images

Java4Shell (CVE-2026-114938) is a HotSpot memory-corruption bug in the AVX-512 VBMI Base64 decoding intrinsic that writes up to 62 bytes past a heap buffer, enabling heap disclosure and pre-auth RCE in apps like Keycloak and Jenkins on Java 17.0.6+ running on affected x86-64 CPUs. Exposure requires a vulnerable Java version, an AVX-512 VBMI host, and attacker-controlled Base64 input. The guidance covers checking CPU flags and runtime versions in shell-less images, tracking which vendor builds are fixed, and applying -XX:-UseBASE64Intrinsics as a stopgap. That flag must be set via JAVA_TOOL_OPTIONS or JDK_JAVA_OPTIONS, not JAVA_OPTS, with care around FIPS images, Java 8 and child JVMs, then verified on the running process; NGINX HTTP/2 fixes ship in 1.30.7 and 1.31.9.

Related posts

  • Java4Shell (CVE-2026-114938): how to find every vulnerable JDK across your repos and servers

    Sourcegraph mediumAdept

    Java4Shell (CVE-2026-114938) is a CVSS 9.2 heap overflow in HotSpot's AVX-512 VBMI Base64 decoding intrinsic. When input ends in padding, a miscalculated store mask writes a full 64 bytes, so any untrusted Base64 path (auth headers, JWTs, SAML, uploads) can reach it on OpenJDK 17.0.6+ running on affected x86-64 CPUs. Exposure depends on which node a workload lands on, so every JDK 17+ should be treated as vulnerable. The post gives regex Code Search queries for Dockerfiles, package installs, Helm charts and CI workflows, plus a remediation checklist. Use -XX:-UseBASE64Intrinsics rather than -XX:UseAVX=2, which breaks ARM. Then patch pre-auth tools first, chase bundled JDKs, restart JVMs, rotate secrets and hunt for hs_err logs.

  • How Cloudflare WAF helps protect against Java4Shell (CVE-2026-114938)

    Cloudflare mediumAdept

    Java4Shell (CVE-2026-114938, CVSS 9.2) is a memory-corruption bug in OpenJDK's AVX-512 Base64 decoder intrinsic. Malformed padding at the tail produces a negative length that becomes a 64-byte write, overflowing the output array: 64 'A's plus '=' write 62 bytes past a 50-byte buffer, and the overflow happens before Java rejects the input. Calif chained it into heap leaks and RCE against Keycloak, Jira, Jenkins and others, but only on OpenJDK 17.0.6+ running on x86-64 CPUs with AVX-512 VBMI. Cloudflare shipped managed WAF rules in Log mode plus attack-score guidance, and says patching or the -XX:-UseBASE64Intrinsics / -XX:UseAVX=2 flags are the real fix because non-HTTP, outbound TLS and internal paths bypass any WAF.

  • How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)

    Cloudflare mediumAdept

    ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution. Default Rails and classic Sinatra apps are exposed before authentication because Rack's MethodOverride middleware upcases the `_method` parameter, which an attacker can send in a legacy charset via a multipart POST. Cloudflare added Block-by-default managed rules for this CVE and the related integer overflow GHSA-87fm-7w84-j2px on all plans, and suggests attack-score custom rules as extra defense. It stresses that the WAF cannot see direct-to-origin, internal or non-HTTP paths, so upgrading to Ruby 3.3.14, 3.4.13 or 4.0.10 and restarting all processes is the real fix.

  • Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos

    Sourcegraph mediumAdept

    Ruby2Shell (CVE-2026-132825) is a critical heap overflow in Ruby's string case conversion that researchers say default Rails and classic Sinatra apps expose without authentication, with remote code execution proofs of concept known. Fixed releases are 3.3.14, 3.4.13 and 4.0.10, and the hard part is finding which interpreter actually runs, because Dockerfiles, .ruby-version, Gemfile and Gemfile.lock can disagree and vendor products may bundle their own Ruby. Sourcegraph gives regex Code Search queries for affected version pins, a Deep Search prompt to reconcile pins per repo, and an Agentic Batch Changes prompt to bump exact pins within each series. Floating tags, unresolved build args and Ruby 3.2 or earlier are flagged for rebuild, review or migration rather than edited automatically.

  • php2shell: patching PHP is easy, finding it is the hard part

    Sourcegraph mediumAdept

    PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two unauthenticated RCE memory-safety bugs (CVE-2026-109618/109619, dubbed php2shell) in the request lifecycle, reachable on mod_php via a crafted multipart POST before application code runs. PHP 8.1 and older get no fix. The hard part is inventorying every PHP runtime across Dockerfiles, OS package installs, Helm charts, CI workflows and Composer pins, and concrete regex searches are given for each. Remediation order: patch internet-facing mod_php first, restart workers, rotate credentials the web user can read, preserve forensics, rebuild images, and isolate EOL hosts. The rest is a pitch for Sourcegraph Deep Search and Agentic Batch Changes to automate the inventory and version bumps.

The quest for software engineering knowledge.

Look:
Layout: