Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5532b56
java4shell: knowledge table for CVE-2026-114938 with sources
devGregA Nov 17, 2026
d96bc7f
java4shell: detector for Java runtimes, images and source trees (WIP,…
devGregA Nov 17, 2026
feddaa8
java4shell: unit tests for the VM library reader, verdicts, mitigatio…
devGregA Nov 17, 2026
e9a55c2
java4shell: source-tree scan and fix tests, fuzzers in CI
devGregA Nov 17, 2026
9c2e11d
java4shell: record the observed out-of-bounds write per release and m…
devGregA Nov 17, 2026
817730e
java4shell: parity fixtures, results and README
devGregA Nov 17, 2026
f8f171f
java4shell: Tomcat setenv.sh covers the JVM catalina.sh starts
devGregA Nov 17, 2026
2b2e44f
java4shell: fixes from an independent review
devGregA Nov 17, 2026
abd7c21
java4shell: the lead's advisory facts, Oracle's Java 8 Performance Pa…
devGregA Nov 18, 2026
142c824
java4shell: read musl version lines; never clear on the release file …
devGregA Nov 18, 2026
024e781
java4shell: builds before the fixed build and pre-release JDKs are no…
devGregA Nov 18, 2026
d03d317
java4shell: a mitigated runtime stays vulnerable
devGregA Nov 18, 2026
300fa30
java4shell: a command that turns the decoder back on voids the mitiga…
devGregA Nov 18, 2026
0545fd2
java4shell: settings files count only what the launcher passes to java
devGregA Nov 18, 2026
1fdfa6e
java4shell: cap what one target makes the detector keep
devGregA Nov 18, 2026
e96edfa
java4shell: more install syntax, vendor packages and version names
devGregA Nov 18, 2026
66a4124
java4shell: fix states the checked digest, refuses shared ARGs, keeps…
devGregA Nov 18, 2026
48cd303
java4shell: partly read images, guarded platform lookup, JDK archives
devGregA Nov 18, 2026
a092f13
java4shell: word the CVE-to-fix mapping as inferred and drop certaint…
devGregA Nov 18, 2026
f9666e5
java4shell: registry-path tests, more fuzzers, crash-log bounds, dead…
devGregA Nov 18, 2026
384b1d0
java4shell: parity asserts where each version came from; musl and bui…
devGregA Nov 18, 2026
611e73f
java4shell: OpenJ9 only from an OpenJ9 VM library
devGregA Nov 18, 2026
c389540
java4shell: self-built JDKs are unknown at a build boundary; -LTS is …
devGregA Nov 18, 2026
fc57271
java4shell: a closer model of setenv.sh
devGregA Nov 18, 2026
d110598
java4shell: runtime downloads recorded by name; plain units do not co…
devGregA Nov 18, 2026
5fcfc22
java4shell: package names only as install arguments
devGregA Nov 18, 2026
be4c798
java4shell: compare the base OS on every image move, by distribution …
devGregA Nov 18, 2026
416c81d
java4shell: dates from the knowledge package; wording nits
devGregA Nov 18, 2026
7427e27
java4shell: install forms the argument parser dropped
devGregA Nov 18, 2026
accee68
engine: contain a panic in VisitHead like one in Visit
devGregA Nov 18, 2026
e03713f
java4shell: the os-release probe keeps to --max-file-size
devGregA Nov 18, 2026
25ea009
java4shell: setenv.sh stops at return or exit; an exec of java that u…
devGregA Nov 18, 2026
88646ff
java4shell: Ubuntu YY.04 and YY.10 are different bases
devGregA Nov 18, 2026
881f5be
java4shell: apk @repo tags and package names with a variable for the …
devGregA Nov 18, 2026
11572af
Build with Go 1.27.4 for GO-2026-6859 (net/http)
devGregA Nov 18, 2026
62f3d8b
Build the image with Go 1.27.4 too
devGregA Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ jobs:
go test ./detectors/sshole/internal/assess -run '^$' -fuzz '^FuzzAccounts$' -fuzztime 30s
go test ./detectors/sshole/internal/assess -run '^$' -fuzz '^FuzzStartup$' -fuzztime 30s
go test ./detectors/sshole/internal/repo -run '^$' -fuzz '^FuzzScanText$' -fuzztime 30s
go test ./detectors/java4shell/internal/jvm -run '^$' -fuzz '^FuzzInspect$' -fuzztime 30s
go test ./detectors/java4shell/internal/jvm -run '^$' -fuzz '^FuzzSettings$' -fuzztime 30s
go test ./detectors/java4shell/internal/knowledge -run '^$' -fuzz '^FuzzParse$' -fuzztime 20s
go test ./detectors/java4shell/internal/repo -run '^$' -fuzz '^FuzzScanText$' -fuzztime 30s
go test ./detectors/java4shell/internal/jvm -run '^$' -fuzz '^FuzzParseRelease$' -fuzztime 15s
go test ./detectors/java4shell/internal/assess -run '^$' -fuzz '^FuzzAPKOwners$' -fuzztime 15s
go test ./detectors/java4shell/internal/assess -run '^$' -fuzz '^FuzzDpkgOwners$' -fuzztime 15s
go test ./detectors/java4shell/internal/assess -run '^$' -fuzz '^FuzzRun$' -fuzztime 30s
go test ./detectors/java4shell -run '^$' -fuzz '^FuzzReadCrash$' -fuzztime 15s
for f in FuzzParseDpkgStatus FuzzParseAPKInstalled FuzzParseHeaderBlob FuzzReadBDB FuzzReadNDB FuzzResolver; do
go test ./detectors/php2shell/internal/pkgdb -run '^$' -fuzz "^$f\$" -fuzztime 15s
done
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.27.3 AS build
FROM golang:1.27.4 AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ One engine for DefectDojo's emerging-vulnerability scanners. Each new vulnerabil
| `php2shell` | PHP runtimes vulnerable to CVE-2026-109618 and CVE-2026-109619 ("PHP2Shell"), fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 ([GHSA-w8hw-w9fx-j79w](https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w), [GHSA-6wmf-4rv5-p3rp](https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp)). A packaged PHP is judged by its vendor's backport data, never by the version it reports. Also checks the images a source tree builds on and deploys, and can rewrite them to fixed images | `fs`, `image`, `repo`, `fix` |
| `brotli` | Brotli decoders vulnerable to CVE-2026-111497 ("Node2Shell", "Broccoli2Shell"), Brotli 1.0.3 through 1.2.0, fixed in 1.0.10, 1.1.1 and 1.2.1 ([GHSA-9v8h-qqgm-4m35](https://github.com/advisories/GHSA-9v8h-qqgm-4m35)): system `libbrotlidec` and every copy bundled into other software (Node.js, .NET, Bun, Electron, Envoy and Istio, Python wheels such as Pillow, pyarrow, duckdb, pycurl and PyMuPDF, brotli4j, and more), on Linux, Windows and macOS. A decoder is judged first by the error code the fix added, so vendor backports are recognised without distribution data; a build that strips it by its own version stamp or by its code, which returns that error code only once fixed. In a source tree it finds the Node.js, .NET and Bun releases and the bundling packages a project pins, and `fix` moves each to the fixed release | `fs`, `image`, `repo`, `fix` |
| `sshole` | \*sshole, the OpenSSH password authentication bypass on musl libc fixed in OpenSSH 10.6p2 and in Alpine's openssh packages of November 5, 2026 ([release notes](https://www.openssh.org/releasenotes.html#10.6p2), [writeup](https://sshhole.com)). On musl, sshd from 7.3p1 to 10.6p1 compares an account's password field of `*` with the `*` that crypt returns when it fails, so a crafted password logs in to that account. It judges each installed sshd by its C library, its release and the apk database (Alpine backports keep the release number), then checks what the target's `sshd_config` (Include, Match, PasswordAuthentication, AuthenticationMethods, PermitRootLogin, AllowUsers and the rest) and account files make reachable, and reports the accounts. In an image it also reads the command (`sshd -o` and `-f`) and the startup scripts it runs (entrypoints, s6, cont-init.d), and reports a server as exposed when a startup script turns password logins on, sets a `*` field or sets passwords. OpenWrt's opkg database and its backports (23.05, 24.10, 25.12) count like Alpine's. PAM-checked builds (`UsePAM yes`) are not affected. On a live server it reads the banner and the offered methods and never sends a password. In a source tree it finds Dockerfiles that install an OpenSSH server on Alpine without the fix (package lists in `ARG` and `ENV` too), Ansible apk tasks, Buildroot, OpenWrt and Yocto configurations that build one on musl, and anything that sets a password field to `*`. It also pulls the images the tree references (through the guarded transport, with the command a Compose service or Kubernetes container sets) and judges them like `scan image`. `fix` adds the fixed release floor (in the variable when the list is one), moves an end-of-life Alpine base to a tag on the nearest fixed Alpine release (`alpine:3.14` to `3.16`, `python:3.9-alpine3.14` to `3.9-alpine3.16` after checking that image) as a labelled upgrade, adds upstream commit 4353fdc43 as a patch scoped to the OpenSSH versions it applies to (Buildroot `BR2_GLOBAL_PATCH_DIR`, a version-specific Yocto bbappend), sets Ansible tasks to `state: latest`, and changes `*` to `*NP*` | `fs`, `image`, `host`, `repo`, `fix` |
| `java4shell` | Java4Shell (CVE-2026-114938), an out-of-bounds write in HotSpot's AVX-512 VBMI Base64 decoder on x86-64, fixed in OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 on November 15, 2026 by JDK-8393212 ([commit](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b); that this change is the CVE's fix is inferred from the public descriptions, since the OpenJDK advisory could not be read: see the [knowledge table](detectors/java4shell/FACTS.md)). Decoding a malformed Base64 input that ends in a padded fragment of one to three characters (64 `A` then `=`) writes up to 64 bytes past the output once the decoder is compiled, on CPUs with AVX-512F, AVX-512BW, AVX-512 VBMI and BMI2 (Intel server CPUs from Ice Lake on and some client CPUs, not Alder Lake or Raptor Lake; AMD Zen 4 and later); [Calif](https://calif.io/java4shell/) showed pre-authentication code execution on default Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate. The decoder came with JDK 18 and 17.0.6; OpenJDK 8, 11 and 17.0.0 to 17.0.5 do not have it (Oracle's Java 8 Performance Pack carries it and is reported vulnerable up to 8u511), and Java 18 to 20, 22 to 24 and 26 received no fix. It finds Java runtimes by their VM library (`libjvm.so`, `jvm.dll`, `libjvm.dylib`): installed JDKs and JREs, jlink images, distribution packages (apk, dpkg, and rpm by install path) and runtimes bundled in products (Atlassian, Elasticsearch, Artifactory, JetBrains IDEs and others); a JDK download sitting in the target (OpenJDK21U-jre_…tar.gz and the like) is recorded by name as context, not read or unpacked. Each is judged by what the library proves: its CPU architecture (only x86-64 is affected; each platform of a multi-arch image is judged on its own with `--platform all`), the version compiled into it, and whether it carries the decoder's stubs, which catches a vendor backport into an older line; the `release` file is a second witness: when the library's version line can be read, the library decides and a different release-file version is only noted; a release file naming OpenJ9 next to HotSpot evidence makes the verdict unknown; and a release file alone does not clear a runtime (OpenJ9 is recognised from its own VM library, not from the release file). No marker in the binary separates fixed from unfixed code, so the fix itself is judged by version and build (the first fixed build of each release, such as 21.0.13.1+2; pre-release builds are not judged fixed, and a self-built JDK at a build boundary is unknown). OpenJ9 (IBM Semeru) is not HotSpot and is not affected. `-XX:-UseBASE64Intrinsics` or, on x86-64 only (an ARM JVM refuses it), `-XX:UseAVX=2` or lower in the image's `JAVA_TOOL_OPTIONS`, `JDK_JAVA_OPTIONS` or `_JAVA_OPTIONS`, the container's java command, `CATALINA_OPTS` or `JAVA_OPTS` passed on by catalina.sh or the start script, a product's `setenv.sh`, `jvm.options` or `.vmoptions`, or the systemd unit that starts a product, is recorded as a mitigation on a finding that stays vulnerable (status `mitigated`, counted in the exit status): the options can be overridden where the runtime is deployed, and the runtime still needs the update; `_JAVA_OPTIONS` turning the intrinsic back on undoes it. A filesystem scan records the scanning CPU's AVX-512F, AVX-512BW, AVX-512 VBMI and BMI2 flags and any `hs_err_pid*.log` as context; neither clears a runtime. In a source tree it judges Java images by their tags (eclipse-temurin, amazoncorretto, azul/zulu-openjdk, bellsoft/liberica, sapmachine, openjdk, Microsoft and Oracle images) in Dockerfiles, Compose, Kubernetes, Helm values, CI files and Jib configuration, reads moving tags and product images (Jira, Elasticsearch, Jenkins, Tomcat...) from the registry for linux/amd64, and checks setup-java, `.java-version`, `.sdkmanrc`, `.tool-versions`, mise, Gradle and Maven toolchains, the Maven Enforcer floor, `BP_JVM_VERSION` and the OpenJDK packages a Dockerfile installs, with the mitigation a stage, Compose service or Kubernetes container sets. `fix` moves an image tag to the first published fixed tag of the same variant (`21.0.13_9-jre-alpine` to `21.0.13.1_2-jre-alpine`, or for Corretto, which republishes the update's tag, `21.0.12-al2023` to `21.0.13-al2023`) after reading it and finding the fixed runtime, and a setup-java pin to the major version when the distribution's newest release is fixed (Corretto, SapMachine); everything else gets the exact manual step, and a product image gets the interim `ENV JAVA_TOOL_OPTIONS` line as an optional edit it does not apply | `fs`, `image`, `repo`, `fix` |

The detectors ported from standalone scanners also build as standalone binaries under the names people search for: `emudhra-scan` and `php2shell-scan`. They keep their original commands, flags and exit status rules. `brotli` and `sshole` were written here and run through `earlylight` (`--detector brotli`, `--detector sshole`).
The detectors ported from standalone scanners also build as standalone binaries under the names people search for: `emudhra-scan` and `php2shell-scan`. They keep their original commands, flags and exit status rules. `brotli`, `sshole` and `java4shell` were written here and run through `earlylight` (`--detector brotli`, `--detector sshole`, `--detector java4shell`).

## Install

Expand Down Expand Up @@ -50,6 +51,10 @@ sudo earlylight scan fs --detector sshole / # this machine's sshd
earlylight scan host --detector sshole bastion.example:22 # banner and offered methods; sends no password
earlylight scan repo --detector sshole . # Dockerfiles, scripts and Ansible tasks
earlylight fix --detector sshole --dry-run . # fixed apk floors, "*" to "*NP*"
earlylight scan image --detector java4shell --platform all eclipse-temurin:21-jre # Java runtimes, per platform
sudo earlylight scan fs --detector java4shell / # the JDKs, JREs and bundled runtimes on this machine
earlylight scan repo --detector java4shell . # Java images, versions, toolchains and packages a tree pins
earlylight fix --detector java4shell --dry-run . # moves to published fixed images, after reading them
earlylight scan image --platform all myorg/app:prod # every platform the image has
sudo earlylight scan fs / # this machine
earlylight scan fs --as-root /host # a host mounted elsewhere
Expand Down Expand Up @@ -113,6 +118,7 @@ The engine enforces one rule for every detector: a finding can only be `fixed`,
| `detectors/php2shell` | Adapter, `verbatim.go` from php2shell-scan's command line, and `internal/` copied verbatim from php2shell-scan |
| `detectors/brotli` | Adapter, plus `internal/fingerprint` (what a binary proves: the decoder's error table, its tables and code, exports and version stamps), `internal/assess` (the verdict and fix for one file) and `internal/pins` (pins and bundling packages in a source tree, and their verified edits), which know nothing about the engine |
| `detectors/sshole` | Adapter and live-host probe, plus `internal/assess` (what an sshd binary proves, musl's shadow lookup and crypt failures, sshd's salt choice, sshd_config with Include and Match, and the verdict) and `internal/repo` (Dockerfiles, scripts and YAML in a source tree, and their verified edits), which know nothing about the engine |
| `detectors/java4shell` | Adapter, plus `internal/knowledge` (the release data and version judgement, sourced in `FACTS.md`), `internal/jvm` (what a VM library, release file and JVM option source prove), `internal/assess` (the verdict for each runtime: product, package, mitigation) and `internal/repo` (Java images, versions and packages in a source tree, and their verified edits), which know nothing about the engine |
| `internal/refs` | Image references in Dockerfiles, Compose, Kubernetes, Helm values and CI files (moved from php2shell, unchanged, so every detector can read them) |
| `parity/` | Proves each port gives the same results as its standalone scanner |
| `brand/` | The Early Light logo, favicons, avatar and social preview |
Expand All @@ -127,6 +133,7 @@ Every port must give exactly the verdicts of the scanner it came from before it
- `parity/brotli.py` has no standalone scanner to compare with, so it checks every decoder in 38 images against the vendor's own fix status: Node.js, .NET, Bun, Envoy and curl images before and after their October 2026 releases, distribution packages pinned to their exact unfixed and backported builds, and the Python wheels ([BROTLI-RESULTS.md](parity/BROTLI-RESULTS.md)).
- `parity/brotli_files.py` checks 73 release binaries and packages, unpacked and never run: Node.js, .NET and Bun for Windows and macOS, seven Electron releases, Envoy and Istio, and the packages that bundle the decoder ([BROTLI-FILES-RESULTS.md](parity/BROTLI-FILES-RESULTS.md)). A WebAssembly build of the decoder is the one case it cannot settle: it is reported as unknown.
- `parity/sshole.py` builds ten images from `parity/sshole/` (Alpine with the unfixed and the fixed package, password logins off, UsePAM on, root with PermitRootLogin, a Match on address, the current Alpine release, Debian, an entrypoint that turns password logins on at start, and `sshd -o` in the image command) and checks each verdict against the expected one ([SSHOLE-RESULTS.md](parity/SSHOLE-RESULTS.md)). The expected verdicts come from the upstream fix, musl's crypt and shadow code, and the Alpine package that shipped it.
- `parity/java4shell.py` checks 39 cases against verdicts taken from [FACTS.md](detectors/java4shell/FACTS.md), and that each version came from the VM library (not the release file): Temurin 8, 11, 17.0.5, 17.0.6, 17.0.21 and 21.0.13 on Alpine (musl), a musl library under a forged release file, a fixed release rewritten to the build before the fix (synthetic), 18, 20, 21 (also arm64, all platforms of the image, UBI 9), 25 and 27, Corretto (an Amazon Linux rpm and Alpine, before and after Amazon republished their tags with the fix), Zulu, Liberica, SapMachine, Semeru, Elasticsearch's bundled JDK, the fixed SapMachine 21.0.13.1, a jlink image, bundled product runtimes with and without `setenv.sh`, Alpine, Debian and Ubuntu packages, environment, Tomcat CATALINA_OPTS and setenv.sh mitigations and one that is undone, hostile release files and symlink loops, a filesystem scan and an offline source tree ([JAVA4SHELL-RESULTS.md](parity/JAVA4SHELL-RESULTS.md)).
- `parity/php.py` runs php2shell-scan, this repo's php2shell-scan and Early Light over php2shell-scan's validation matrix: official images, distribution packages, source builds and hostile images. Each finding's complete record is compared field by field. It also covers filesystem scans at and below a system root, repository scans, `fix --dry-run`, and every detector at once ([PHP-RESULTS.md](parity/PHP-RESULTS.md)).

## Adding a detector
Expand All @@ -146,6 +153,8 @@ go test ./internal/archive -run '^$' -fuzz '^FuzzWalk$' -fuzztime 60s
go test ./detectors/emudhra/internal/detect -run '^$' -fuzz '^FuzzScan$' -fuzztime 60s
go test ./detectors/sshole/internal/assess -run '^$' -fuzz '^FuzzConfig$' -fuzztime 60s
go test ./detectors/sshole/internal/repo -run '^$' -fuzz '^FuzzScanText$' -fuzztime 60s
go test ./detectors/java4shell/internal/jvm -run '^$' -fuzz '^FuzzInspect$' -fuzztime 60s
go test ./detectors/java4shell/internal/repo -run '^$' -fuzz '^FuzzScanText$' -fuzztime 60s
govulncheck ./...
python3 parity/parity.py path/to/emudhra-scan path/to/earlylight
python3 parity/php.py path/to/php2shell-scan ./php2shell-scan ./earlylight path/to/emudhra-scan cases.json
Expand Down
1 change: 1 addition & 0 deletions detectors/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package all
import (
_ "github.com/DefectDojo/earlylight/detectors/brotli"
_ "github.com/DefectDojo/earlylight/detectors/emudhra"
_ "github.com/DefectDojo/earlylight/detectors/java4shell"
_ "github.com/DefectDojo/earlylight/detectors/php2shell"
_ "github.com/DefectDojo/earlylight/detectors/sshole"
)
Loading
Loading