Skip to content

Security: douglasmun/CVE-2026-114938_Java4Shell_lab

Security

docs/SECURITY.md

Security policy

This repository is a secure-coding laboratory. It reproduces a disclosed, patched vulnerability — CVE-2026-114938 ("Java4Shell") — for education. It is not a product and runs no service you could attack. Read this before you run or fork it.

What this repo contains

A faithful, logic-level reproduction of a heap buffer overflow in HotSpot's AVX-512 java.util.Base64 decode intrinsic, plus a Docker-based negative control. The C model (repro/base64_tail_model.c) reproduces only the vulnerable arithmetic and the masked store; it overflows its own heap allocation and is caught by AddressSanitizer. It contains no exploit, no shellcode, no payload, and no network code — it demonstrates why the defect corrupts memory, not how to weaponize it.

The underlying flaw was disclosed and fixed on 2026-11-17 (Oracle November CSPU / OpenJDK advisory). This repository also proves the shipped guard rejects the same input. Nothing here is a zero-day.

Why this cannot be turned into a working exploit here

The real crash requires the AVX-512 VBMI decode intrinsic to execute on affected x86-64 hardware. This lab runs on ARM / under QEMU, where that path is never taken (see DEFAULT-VS-VULNERABLE.md). The C model does not run the intrinsic at all — it models its arithmetic. There is no control-flow hijack primitive in this repository.

Responsible use

Run the reproduction against your own host and your own containers only. Do not point the trigger programs at a JVM, service, or system you are not authorized to test. The included input generators produce benign Base64 strings; using them against a system you do not control may still be unauthorized access and a crime in your jurisdiction.

Reporting

If you believe something here goes beyond education — for example, if a file could be used directly against a third-party system — open an issue describing the concern (without attaching a working exploit) and it will be addressed.

There aren't any published security advisories