Repository navigation
Add the java4shell detector for Java4Shell (CVE-2026-114938) - #9
Merged
Merged
Conversation
Fix commit and JDK bug per OpenJDK line, the commit that introduced the AVX-512 VBMI decode path and the first release on each line that has it, and the fixed or not-yet-fixed release per vendor and distribution as of 2026-11-17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests next) Finds Java runtimes by their VM library and judges each by its CPU architecture, the version compiled into it and the AVX-512 VBMI decode stubs it carries, with the release file as a second witness. JVM options that keep the decoder from being generated are reported as mitigated. Source trees: Java images, version files, setup-java, toolchains, buildpacks and distribution packages; fix moves image tags and setup-java versions after verifying them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns and filesystem scans Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itigation in FACTS.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parity/java4shell.py checks 33 cases (vendor images per line, arm64 and every platform of a multi-arch image, the fixed SapMachine 21.0.13.1, a jlink image, bundled product runtimes, Alpine, Debian and Ubuntu packages, mitigations, hostile inputs, a filesystem scan and an offline source tree) against verdicts from FACTS.md: 33/33 match. A Dockerfile stage's JAVA_TOOL_OPTIONS mitigation now also covers the packages it installs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setenv.sh configures the JVM its start script launches (JAVA_HOME or JRE_HOME, or java on PATH), not only runtimes inside the product directory, when the container's command runs that script. The parity runner can rerun named cases and update only their rows, since Docker Hub's anonymous pull limit can stop a full run part way: 34/34 match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Corretto versions with its build number in the fourth place
(21.0.13.11) are no longer judged fixed: CorrettoJava reads them, and
Judge reports any fourth number above 3 as unknown
- a Dockerfile stage's mitigation is decided from the last ENV of each
variable, so a later _JAVA_OPTIONS or JAVA_TOOL_OPTIONS undoes it
- CATALINA_OPTS and other script variables cover only the JVM the
script starts (JAVA_HOME, JRE_HOME or PATH)
- systemd: only JVM-read variables count, HotSpot's order applies
(_JAVA_OPTIONS last), and unit files and drop-ins are merged by
systemd's precedence before judging
- settings files in general directories (/etc, /usr/local, /opt) and
product directories of /opt, /app or /usr are refused as scopes
- shell comments in setenv.sh are ignored
- the VM version line is searched only around " JRE (", so large
printable files cannot make the regex scan from every position
- setup-java early-access versions are not judged; the fixed tag with
the lowest build is chosen numerically
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck, Corretto's republished tags - FACTS.md: the public writeups as relayed by the lead (Calif, Semgrep): CVSS 9.2, the trigger, the products shown exploitable, Oracle's affected builds including 8u511b33-perf, the ARM caveat for -XX:UseAVX=2, indicators; vendor status rechecked 2026-11-18 - a Java 8 VM library that carries the AVX-512 decoder's stubs (Oracle's Performance Pack backport) is vulnerable up to 8u511, unknown above - severity 9.2, advisories led by Calif's; PingFederate, Spinnaker and Gerrit recognised as products - Amazon republished amazoncorretto:21.0.13-* and 17.0.21-* with the fixed builds: fix can now move a Corretto pin to the fixed update's tag, after reading it; parity keeps the old images pinned by digest and expects the new tags fixed (36/36) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alone Review findings 1 and 6. HotSpot on musl names its platform linux-amd64-musl, which the version-line pattern refused, so Alpine runtimes were judged by their release file. A release file now never clears a runtime alone, four bytes 'j9vm' no longer make a library OpenJ9 (the redirector has no decoder stubs and names OPENJ9_JAVA_OPTIONS), and a release file that names OpenJ9 next to a HotSpot library that was read makes the verdict unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t fixed Review findings 2, 12 (JDK 28 updates) and 13. The release data now has the first build of each fixed release with the fix (17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4; checked in the openjdk update repositories and recorded in FACTS.md): +0 and +1 lack it. Any pre-release identifier (beta, internal) and adhoc builds count as pre-release. A version older than the fixed update is vulnerable whatever its fourth number. Temurin tags carry the OpenJDK build, so fix never moves to a fixed release's earlier build, and a JDK 28 update is unknown, not early access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review finding 3, as the lead decided: JVM options that keep the decoder from being generated are recorded on the finding (status mitigated, the option and where it was set) and the finding stays vulnerable, so it is shown by default and counts in the exit status. fix also moves mitigated pins. Parity expectations and README follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion Review findings 4 and 9. Words of the container command that turn the intrinsic back on (-XX:+UseBASE64Intrinsics, -XX:UseAVX=3 or higher) now count wherever the java they start is: a sh -c script, a java this scan cannot tie to a runtime. A java @argfile makes a mitigation unprovable. _JAVA_OPTIONS still applies last. In a source tree the same holds for a Dockerfile stage's ENTRYPOINT and CMD and a Compose service's or Kubernetes container's command and args. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review finding 5. setenv.sh is read as assignments to the variables a start script passes to java (CATALINA_OPTS, JAVA_OPTS, JVM_SUPPORT_RECOMMENDED_ARGS, the JVM's own variables...): the last assignment wins, $VAR appends, other variables and echo text do not count, and a file that sets one of them under a condition, loop or function counts for nothing. setenv.bat is read the same way and only for Windows runtimes. Cassandra's jvmNN-*.options apply to Java NN only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review finding 7. Release files, settings files, dpkg file lists (now kept only for their libjvm.so and release lines), start scripts and package data have count and total-byte caps. A target that reaches one records a problem, and its fixed and not-affected verdicts become unknown with the reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review findings 8, 11 and 12. Installs are recognised with flags before the verb (yum -y install, apk --no-cache add, apk -U add), vendor packages (temurin-21-jdk, zulu21-jdk, msopenjdk-21, sapmachine-21-jdk, Corretto) and default-jre are read, and a version range (17.*, ~17) counts as unpinned instead of as Java 17. An unpinned Corretto or SapMachine package is unknown (their fix is published, so it depends on when the image was built), not "the distribution had no fix"; a Java 28 package is not checked rather than "no fix". jenv names (temurin64-21.0.13), GraalVM's 22.3.r17 and Zulu's own numbers are handled, a moving setup-java Temurin version is reported, and a FROM --platform=linux/arm64 stage is skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the base OS Review finding 10. The summary of an image move gives the linux/amd64 digest that was checked, and for a republished tag (Corretto's 21.0.13) says to pull again and how to pin the digest. A tag that comes from a variable used elsewhere in the file is not edited. When the tag's variant does not name the base OS (-jre), the verifier reads the current image too and refuses a move to another distribution (the detector now annotates an image's os-release). The setup-java summary mentions check-latest for self-hosted runners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review finding 14. A pulled image that was read only in part and showed no runtime is reported as not checked instead of dropping the reference. The verifier's platform lookups go through the guarded transport (and --public-registries-only) with the timeout, instead of image.Platforms. A Java runtime download inside a target (a JDK tar.gz or zip) is recorded as not scanned. fix summaries say the digest checked is the tag's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y claims Review finding 15. Outside FACTS.md, the mapping of CVE-2026-114938 to JDK-8393212 is worded as inferred (reasons name it through BugRef), a fixed runtime is "at or past the first release with the fix (judged by its version)", the CPU list no longer claims every Intel CPU from Ice Lake on, and README claims about the release file, finding runtimes and mitigations match what the detector does. The catalog lists only advisories that could be read; the OpenJDK and Oracle advisories are recorded in FACTS.md as unread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… code Review finding 16. Tests for tagLister, the verifier and pulled images against an in-memory registry; fuzzers for ParseRelease, APKOwners, DpkgOwners, readCrash and assess.Run (which checks that no fuzzed release file, environment, command or settings file clears an unfixed library that carries the decoder), added to CI. FuzzReadCrash found crash-log fields bounded in characters, not bytes: they are now clipped to bytes (its corpus entry is kept). Release.Arch, Setting.Mentions, Options.Set and Finding.Optional were unused and are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld boundary cases Review finding 16. Parity rows now include version_from, so a verdict taken from the release file instead of the VM library fails. New cases: Temurin 21.0.13 on Alpine (musl), a musl library under a forged release file, and a synthetic build-boundary case (SapMachine 21.0.13.1+2 rewritten to +1). 39/39 match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 finding 1. A release file's JVM_VARIANT=Openj9 no longer decides OpenJ9 on its own: only an OpenJ9 library (libj9vm*, or the redirector without a HotSpot version line or decoder stubs) does, and any HotSpot version line or decoder stubs next to OpenJ9 evidence give unknown. A HotSpot library with the decoder whose version line is not parsed, under a release file naming OpenJ9, was not affected; it is now unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not pre-release Round-2 finding 3. A self-built JDK (-internal, adhoc) has no release build number, so at the update the decoder came with (17.0.6) or the release the fix landed in (17.0.21.1...) it is unknown instead of judged by its build; a self-build of an older update is still vulnerable. A -LTS suffix or an rpm release (21.0.13.1.2-1.el9) after the version is no longer read as a pre-release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 finding 2. Keywords count only in command position (so "echo
done" no longer closes a block); function bodies and "&& { }" groups
are conditional; heredoc text is skipped; commands on one line are read
in order and unset clears a variable; the JVM's own variables count
only when exported; only the launcher's variables count (catalina.sh:
JAVA_OPTS, CATALINA_OPTS; JVM_SUPPORT_RECOMMENDED_ARGS only for
Atlassian products), applied in the order the JVM sees them
(JAVA_TOOL_OPTIONS, JDK_JAVA_OPTIONS, JAVA_OPTS, CATALINA_OPTS,
_JAVA_OPTIONS). Multi-line values, helper variables and sourced files
are still not modelled; they are not counted, which leaves the runtime
vulnerable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unt toward the cap Round-2 findings 4 and 5. The engine gets an optional HeadVisitor: a scan that implements it sees the first bytes of every file the walk meets, read or not. java4shell uses it to record Java runtime downloads (names anchored to how vendors publish them: OpenJDK21U-jre_..., amazon-corretto-21-..., zulu21...-ca- jdk21..., jdk-21_linux-x64_bin...) as the annotation java4shell_runtime_archives, without reading them and without counting them as files not scanned. Other archives are not recorded. Only settings files that set a JVM option count toward the settings cap; systemd units without one are kept as small records under their own cap, since an /etc override without options still replaces the unit it overrides. dpkg lists are filtered without splitting them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 finding 6. A RUN line is split into commands, and only the arguments of an install command (<tool> [flags] install|add) are matched, whole, against the Java package patterns: flags and their values, paths and URLs are not packages. A Temurin tarball moved to /opt/temurin-17 or a Zulu download URL on the same line is no longer reported as an installed package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and major version Round-2 finding 7. The verifier now compares the current and the new image's os-release for every move, also when the variant names the distribution (an -alpine or -noble tag can move to the next release), on ID and major version, so a minor update (Oracle Linux 9.5 to 9.6, Alpine 3.21 to 3.22) is accepted and Ubuntu 24.04 to 26.04 is not. The current image is read with a probe that reads only os-release, not a second full scan. A current tag that is gone is tolerated when the new tag names its OS. os-release values are cut to 32 plain characters and decline reasons go through the usual clean-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 nits. Every date in the detector's text comes from the knowledge package: the data date (Checked, now in an AsOf() phrase for "had not published" statements) and the facts it rests on (Disclosed, FixReleased, MainlineFixed, VendorFixPublished); a test keeps date literals out of the other files. The vendor-build reason no longer reads "whether JDK-8393212, inferred to be this CVE's fix is in". The README states what a contradicting release file does (only OpenJ9 evidence makes it unknown; a version mismatch is noted), how runtime downloads are recorded, and that self-built JDKs at a build boundary are unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 finding 1 (a regression from the round-2 argument parser). The
package tool is looked for only outside flags, so RUN --mount=...,
target=/var/cache/apt no longer hides it; a trailing rpm .arch, Debian
:arch or /target-release is stripped before matching; and a pin to a
variable (=${JDK_PKG}) is reported as a pin of unknown version. Parity's
source-tree case gets the same forms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 finding 2. A head visitor that panics on one file loses that file, recorded as not scanned with the detector named, and the scan of the target goes on for every detector. Tests cover that and the branch where another detector wants every file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final review A4. A layer that names lib/libbrotlidec.so.1 over a base where lib is a link to usr/lib (crane append, Bazel, Jib and other tools that write tar paths as they are) puts the file at /usr/lib in the container. The flattener listed both paths as unresolved and the engine forgot what it had read at both: three vulnerable findings on main became "no vulnerable findings" with six coverage gaps. The flattener now knows which layer wrote each entry and each link: - the one file written through a link from a lower layer, landing where no link leads on and no layer at or above its own names the path, is the file: it stays read under the name it was written with, and only the path it landed on is unresolved (a lower file there was replaced); - when a layer above every such write names the real path itself, that entry is the file, and only the writes through the link are unresolved; - anything else (a link of the same layer, two links to one directory, a link to a link, the same layer writing both) is unresolved as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…orgotten Final review A5. In a docker export the last entry for a path is the file, so the earlier one is forgotten. When a directory above the path is a symbolic link that points elsewhere by the second entry (or was a link and is a directory now), the two entries are two files: the first still exists where the link led. Three vulnerable findings on main, none here. The walk remembers every path it met as a symbolic link and forgets nothing below one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t is the runtime's Final review B1. A runtime directory was judged by one "primary" library and the others were never looked at. A JDK 21 unpacked over a Java 8 directory (lib/amd64/server left behind) was cleared as Java 8; a fixed library dropped into bin/server, a fixed server VM next to a vulnerable minimal or client VM, and an aarch64 server VM next to an x86-64 client VM all cleared a vulnerable runtime. The libraries are still judged as one runtime first (an OpenJ9 runtime's redirector and VM are one VM). Then each other library that states a version or carries the decoder is judged on its own, and the worst of the verdicts is reported, with the library that decided and what the first one alone would have said. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…akes the runtime unknown Final review B2. The walk hands a file out under its own name: a symbolic link is recorded and not followed, and a hard link in an image names a file read under the name of its first entry. A libjvm.so that is a link to libjvm.so.21, to hotspot.bin or to an object in an ostree store was never read, and the runtime gave no finding, no skip and exit 0. At the end of a scan every symbolic or hard link named like a VM library whose target was not read as one is reported: the runtime it belongs to is unknown when nothing else there was judged, and unknown instead of cleared when its other libraries would clear it. A link to a library that was read is judged there, and a link to nothing in an image is no runtime. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Final review B4. Every other cap marks the scan as capped (a problem on the target, and no verdict cleared). The cap on VM libraries, the one that leaves a runtime unjudged, only recorded a coverage gap: 4,096 small libraries of another architecture in front of a vulnerable JDK gave "no vulnerable findings" and exit 0. It is a limit like the others now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Final review B3. A libjvm.so with no HotSpot version line and no decoder stubs that contains OPENJ9_JAVA_OPTIONS was taken as OpenJ9's redirector and the runtime was cleared, even under a release file that describes a vulnerable HotSpot build and with no OpenJ9 VM in the runtime. The string now needs a second witness: an OpenJ9 VM library by name (libj9vm) in the runtime, or a release file that names OpenJ9. Without one the runtime is unknown. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t read, however the command reaches it Final review B5. The rule that a mitigation is not reported when the container's start script was not read looked at the command's own words only. With a 310 KiB start script it still said "mitigated" for sh -c "exec /app/start.sh", for a relative path after cd, for a name looked up in PATH behind tini, and for a small script that runs the big one. A start script that was read and itself passes -XX:+UseBASE64Intrinsics was reported as mitigated too. The scan now keeps, for each script it reads, the set of words in it (2,048 bits, so a script is remembered by what it names) and whether it passes an option that turns the decoder back on. A script is reached when the command names it by path or by file name, in any word or shell text, or when a reached script does. No mitigation is reported when a reached script was not read or turns the decoder on, or when there were more scripts than the scan records and the command is not java itself. The verdict was vulnerable in every case and still is; this is the status. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r reads it Final review B6 (Dockerfile RUN). The source-tree scan joined RUN lines itself, and an install was missed, with no finding and exit 0, when the continuation held a comment or a blank line, after a tab, in exec form, in a heredoc, under ONBUILD, with a backtick escape, inside a subshell or a group, behind sh -c, with a redirect written onto the package name, with aptitude, or when the package name came from an ARG or ENV of the file. internal/refs now gives its Dockerfile instructions to detectors (Instructions: continuation lines joined as BuildKit joins them, the escape directive, flags, JSON arguments, heredoc bodies, ONBUILD), and java4shell reads RUN from them. Shell texts are unwrapped, ARG and ENV values of the file are put in, and an install whose package names the file does not give (a variable without a value, a command's output) is recorded as not checked. A Dockerfile the parser refuses is not checked either. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ee scan passed in silence
Final review B6 (references and the walk). No finding, no skip and exit 0
for each of these before:
- FROM image:tag@digest whose tag names a fixed or unaffected release: the
digest is the image that runs, so the reference is not checked (and read
when the scan is online). A tag that says vulnerable is still reported.
- FROM --platform=linux/x86-64, linux/AMD64 or linux: x86-64, judged.
- COPY --from=image and RUN --mount=...,from=image: judged like a FROM,
never edited by fix.
- FROM ${BASE}:${VER} without values: kept as not checked, since a variable
can hide a Java image name.
- A scan root that is a symbolic link (only image references survived).
- Dockerfiles and version files under build, target, vendor, venv, .gradle
and the like: the walk now leaves out only what the image reference scan
leaves out.
- A version or build file that is a symbolic link: recorded as not checked.
- rpm names that several Java packages provide (java-17, jre-21-headless,
java-sdk-25, java): not checked; a range in one quoted word
('java-17-openjdk >= 17.0.21.1') is read for its package.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s not checked, not passed Final review B6 (version files and CI). Each of these gave no finding and exit 0: - .java-version holding a pre-release of a fixed release (27.0.1.1-ea+1, 21.0.13.1-beta+1, -internal), which was cleared as the release; a short version (21, 21.0); a UTF-8 BOM; names in other tools' forms. - .tool-versions with a vendor or word no reader knows (liberica-nik, bisheng, latest). - .sdkmanrc lines with a comment or quotes. - mise files with an array, a table, a quoted key, [tools.java], lts or prefix:, and mise files under other names (.mise/config.toml, mise/config.toml, mise.<env>.toml). - setup-java with a range, an early-access build, java-version-file, distribution jdkfile, no version at all, the action's name in another case, in a composite action (action.yml), or through a YAML alias. A pre-release is judged as one (never the release), a short version is the moving pin it is, and every value that selects a Java release in a form the scan does not read is reported as not checked. A version behind a YAML anchor is shared, so fix does not edit it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…es; Compose build arguments are noted
Final review B6 (build files). A Jib base image was read only when
<from><image> or from { image = } sat on one line, so a pom or
build.gradle in its usual formatting gave nothing; <jib.from.image>,
project.toml's name/value pair for BP_JVM_VERSION,
environment("BP_JVM_VERSION", ...), Kotlin's jvmToolchain(22) and Gradle
files under other names (convention plugins, app.gradle) were not read.
They are now, and a BP_JVM_VERSION in a form that is still not read is
reported as not checked.
A Compose file that sets a build argument replaces the ARG default a
Dockerfile's FROM is read with: that FROM is recorded as not checked for
the image the Compose build uses.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…value another file uses Final review B7. fix skipped every note that was not of the not-checked rule, so a tree whose only findings were unknown (a package the scan cannot read, a vendor's own package, an Enforcer floor) printed nothing and exited 0 while scan exited 3. Every unknown finding is printed as not checked now, and the exit status is 1. A tag held in a .env variable was edited after counting the variable's uses in the one Compose file that led to it. Another Compose file of the directory that uses the variable for a different image got the new tag too. fix declines when a file next to the .env uses the variable as well. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…and OpenJ9 are judged Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…PU models, release dates, ID=rhel README: the parity list counts 43 cases and names the GraalVM CE and Debian sid ones; the Red Hat backport table also needs os-release ID=rhel; the row says how several VM libraries, linked libraries, OpenJ9, the library cap and unread start scripts are judged; 27.0.1.1 was tagged on November 17, not 15; the CPU models follow GCC's CPU tables (the E-core Xeon 6 has no AVX-512). FACTS.md: a sourced row for which CPUs have the four flags (GCC 14.2 -march tables, the research host's EPYC 9B14; cloud prevalence marked inferred); the 18 to 24 row cites the update repositories' last releases; the fixed releases carry their tag dates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…option's value do not decide Second final review, finding 1. ab9090c made arguments of the command unable to lower a verdict, but only when the program is the command's first word. Written "sh SCRIPT", the same layouts were still lower than main: - ENTRYPOINT ["/bin/sh","/entry.sh"] with CMD ["sh","-c","while pgrep sshd ..."], entry.sh starting sshd with -o UsePAM=no: critical on main, inactive here. The first shell looked through every later word for a -c and took the one that belongs to the argument shell as the container's command, which then decided alone. The same behind tini and dumb-init, and for ["sh","/entry.sh","-c",TEXT]. - ["sh","entry.sh"] took /usr/local/bin/entry.sh as the program. A shell looks in the working directory first, which the scan does not know. - ["env","-u","start","/usr/bin/app"] took the script /usr/bin/start, the value of -u, as the program; ["bash","-lc","sshd -o LogLevel=DEBUG","entry.sh"] took the text for an assignment and $0 for the program. Now a shell's search for -c stops at its first operand (the script it runs), a script named without a slash after a shell or right after an option is judged as an argument is (with the others, never alone), and an assignment is NAME=value, not any word with "=". It also takes back a false alarm: ["/bin/bash","/entry.sh"] with CMD ["supervisord","-c",conf] read the config path as shell text and reported critical for medium. On the review's 191 image fixtures every one of these is main's verdict again; what is still lower than main is the script behind tini --, su-exec and env that main never read, and an apk database over 4 MiB. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…lets its runtime be cleared Second final review. Three ways a runtime was cleared on the word of one library while another was not judged: - A library with no HotSpot version line and no decoder stubs beside a fixed one. With OpenJ9's string in it the runtime was unknown before ba373e0 (the files contradict) and fixed after it, since the string alone no longer makes the group OpenJ9 and judgeAll skipped every OpenJ9-marked library. Without the string it was fixed all along. - A VM library the scan met and did not read: over --max-file-size, unreadable, or at a path an image's layers do not settle. Beside a fixed lib/server the runtime was fixed, exit 0; as the runtime's only library there was no finding at all, only the skip record. - A Red Hat row applied to the finding judgeAll returned. With the row's build in lib/server and a 17.0.20 or GraalVM library in lib/client, the server library's verdict was kept as the worst (both vulnerable) and the row then cleared the runtime. Latent: the table is empty. Now judgeAll applies the Red Hat row to each library's verdict before it takes the worst, and a library it cannot judge on its own (in a runtime that is not OpenJ9) makes a runtime that would be cleared unknown. The scan keeps the VM library names VisitOverLimit and VisitUnread tell it about; assess treats them as it treats linked libraries: unknown for a runtime with nothing else, unknown instead of a clear, a note beside a verdict that is not a clear. A Semeru runtime (redirector and libj9vm, one VM) is not affected as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ockerfile that uses its name Second final review, finding 5. 37dd76b recorded "not checked" for every Dockerfile whose FROM uses an ARG that any Compose file in the tree sets as a build argument. A tree with no Java (ARG NGINX=1.27, FROM nginx:${NGINX}, build.args NGINX: 1.28) got a coverage gap, and "earlylight fix --dry-run" went from "nothing to change", exit 0 on main to exit 1. The value is a literal in the Compose file, so the FROM is now read with it and judged like any other reference: eclipse-temurin:${TAG} with build.args TAG: 21.0.13_9-jre over a fixed default is a vulnerable finding that names the Compose file (and is not one fix edits). It is a gap only when the value cannot be read (taken from the environment, or another variable of the reference stays open) and the image could be a Java one, and only for the Dockerfile the service's context and dockerfile name; a service whose Dockerfile the tree cannot place still goes by the ARG's name. An unresolved reference is likewise a java4shell gap only when its name looks like Java or a variable stands where the name is: a variable in the tag of registry.example.com/acme/web is the image reference scan's gap, not this detector's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the install forms that gave nothing Second final review, findings 3 and 8 and the silent RUN forms. A Dockerfile refs.Instructions refused (an unterminated heredoc, a directive given twice, an escape character it does not accept) became one skip record: "FROM debian:12 / RUN apt-get install -y openjdk-17-jdk / RUN cat <<EOF" was vulnerable, exit 1 on 62f3d8b and "OK", exit 0 here. Such a file is now read line by line as well: RUN lines and the shell text under them for installs, FROM and COPY --from for images. The skip stays, nothing is reported as mitigated from it, and fix edits nothing in it. The same reader takes a Dockerfile over refs' 1 MiB limit, which Instructions now refuses as the image reference scan does: a 4 MiB Dockerfile peaked at 934 MB (239 MB on main), now 267 MB. Installs that gave no finding and no skip: - exec form of one command, RUN ["sh","-c","apt-get install -y x"], and the shell texts behind bash -o pipefail -c, -euo pipefail -c, --login -c, su -c, sudo sh -c, chroot DIR sh -c and eval. An exec form without a shell is read word by word, so "&&" is an argument. - xargs: the names an echo or printf pipes into it are read; a list from a file or another command is recorded as not in this file. - Bitnami's install_packages, nala, apt-fast, apt-get satisfy, and upgrade, update and downgrade with a package named. - The tool in a variable: ARG APT="apt-get install -y" with RUN $APT openjdk-17-jdk, and a variable the file does not set followed by a Java package name. - A shell variable the RUN line sets itself (PKG=x && ..., export, for, read, a command's output) is no longer read with the ARG default of the same name. - ARG and ENV values are kept per stage: an ARG before the first FROM is global and a stage has it once it declares it, a stage built on an earlier one starts with that stage's ENV, and nothing else carries over. ONBUILD ENV, ARG, CMD and ENTRYPOINT set nothing in the image being built: ONBUILD ENV JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics marked the stage's findings mitigated. refs.Instruction says Onbuild; ONBUILD RUN and ONBUILD COPY --from are still read. A "#" at the start of a word ends a shell line: "apt-get install -y openjdk-17-jdk # java" no longer adds an unknown finding for a package called java. Against 8dbc868 on the review's 278 Dockerfile probes: 29 differ, 28 are a finding or a skip where there was nothing or less. The one that is lower is a heredoc whose continuation runs into a comment line ("apt-get install -y \" then "# java" then the package on its own line): the shell installs nothing there, and the unknown finding it had was the "java" of the comment. The other detectors' findings and skips on the 207-Dockerfile corpus are the same as on main. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ks and by layer order; a file named twice in a layer is read twice Second final review, finding 2. A path the flattener could not settle is forgotten and left as a coverage gap, which does not change the exit code. 2c2d19b kept the one file written through a single link; six other layouts still gave "OK", exit 0, where main reports the vulnerable library and docker export shows the container has it: - a link chain (lib -> usr/lib -> ../opt/real) and a link to the root; - ".." in a link's target after another link, where the landing path was worked out as text and an unrelated file was forgotten instead; - the same file written through the link and by its real path in one layer, and through two links to one directory; - one path twice in one layer. The flattener now knows each entry's place in its layer as well as its layer, and places an entry written under a link by following the stream's links one path component at a time, as the runtime did. All the entries that land on one path are one file, and the one the runtime applied last (a higher layer's, or a later entry of the same layer) is it: it stays read under the name it was written with, and the others are unresolved. It is not kept when a layer above the write took away a directory above the landing path (a whiteout, an opaque marker, a file in the directory's place): 2c2d19b had given back an emudhra clear on a certifi bundle whose directory a higher layer removed. An entry stays unresolved when a link on its way is of its own layer or a higher one, for a loop, and when the last entry through a link is a whiteout. A path a layer names twice as a regular file is written to the stream twice, the second entry marked with a PAX record (image.ReplacesRecord). The tar reader, which takes the first entry for a path in a flattened image, takes a marked entry as a docker export's repeat: the scans forget the first and read the second. Two entries of other kinds for one path stay unresolved. java4shell does not count a VM library as unread at a path where one written through a link landed and was read under its own name. On the review's fixtures all six are exit 1 with main's finding again; the same path twice, clean then vulnerable, is vulnerable (nothing on main). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ERSION by line, Zulu's own numbers
Second final review: source-tree forms that passed in silence, or were
read from a comment.
- Jib. The from block was read with one expression that stopped at the
first "}" and wanted "image =" first: from { platforms { ... } image =
"eclipse-temurin:21.0.13_9-jre" } and from { auth { ... } image = ... }
gave nothing, as did <from><platforms>...</platforms><image>, the call
forms image "x" and image("x"), and <image>${base.image}</image> with
the property in the same pom. A commented "image =" line above the real
one was the image that was judged. The block is now matched by its
braces (the element by its closing tag), nested blocks are left out,
and comments are blanked first. A from block whose image this scan
cannot read (a variable, a property set elsewhere, none) is not
checked.
- BP_JVM_VERSION = 21, 21.0 or 21.* gave nothing: only a line without a
fix or a three-number version was judged. It is the newest BellSoft
Liberica release of the line at build time, a moving pin whose status
is not checked, as .java-version 21 is. Lines 8 to 16 stay silent. A
commented BP_JVM_VERSION is not a setting, and a pom's closing
</BP_JVM_VERSION> is no longer counted as a second, unread one (a fixed
pin exited 3 over it).
- Zulu. FACTS.md says Azul Zulu's own numbers start with the Java line
and a line without a fix is vulnerable from that number alone. That
held in .tool-versions and mise files; azul/zulu-openjdk:22.32.15, the
jenv name zulu64-22.32.15 and setup-java's zulu distribution said "not
a Java version" (vulnerable on 62f3d8b). They follow the rule again; a
bare 22.32.15 and other vendors' tags stay not checked.
On the review's 125 probes of these readers 28 differ from 8dbc868: 24
are a finding or a note where there was nothing or less, one names
another line, two lose only
the spurious closing-tag note, and the fixed pom pin 21.0.13.1 is clean.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r the race detector go test -race, which the release workflow runs, allocates several times more in the same scan (985 MiB against under 160 MiB), so the bound on a 4 MiB Dockerfile failed there. The finding and the skip are still asserted under -race; the bound is checked in a plain run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…runtime unknown, as FACTS.md says 18539ac changed the rule and FACTS.md; the README row still said only a linked VM library makes a runtime unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The finding description (and so detectors.json) still said "Intel server CPUs from Ice Lake on ... AMD Zen 4 and later; common on cloud instances": that takes in the E-core Xeon 6, which has no AVX-512, and states as fact what FACTS.md marks inferred. It now gives GCC's CPU tables as README does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devGregA
added a commit
that referenced
this pull request
Nov 19, 2026
Brings in #9 (bcf0f20): the java4shell detector, the engine's HeadVisitor, Limiter, LimitVisitor, FinishSkipper, UnreadVisitor and Forgetter, one skip record per path, layer flattening, and the sshole, emudhra, brotli and php2shell changes. Conflicts, each resolved by keeping both sides: - README.md: the java4shell and nginxh2 rows, examples, layout, parity and fuzz lines; the "written here" sentence names both detectors. - detectors/all/all.go: both imports, in order. - internal/engine/engine.go: nginxh2's WorkingDirer and SkipVisitor next to #9's new interfaces. - internal/engine/run.go: finish keeps nginxh2's visitSkips call and #9's FinishSkips and one-record-per-path merge; ScanImage sets both the working directory and the unresolved-paths hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devGregA
added a commit
that referenced
this pull request
Nov 19, 2026
After the merge of #9 a path can have several records (two detectors that failed on it, a source record and a detector's), and the target merges them in finish. A SkipVisitor now gets them merged the same way, once per path with every reason. The gaps are taken once, before any Finish: a gap another detector reports at the end (FinishSkipper) is a file over that detector's own limit, which the SkipVisitor was shown, and whether it reached the SkipVisitor depended on detector order. Below the system root the walker's own records (a detector that failed on a file, an over-limit gap) already carry the path inside the root, while the source walk's are below the scanned directory; only the latter are moved into the root now. Before, a detector failure on /etc/nginx/x.conf in a scan of /etc reached nginxh2 as /etc/etc/nginx/x.conf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devGregA
added a commit
that referenced
this pull request
Nov 19, 2026
…VE-2026-123633) (#12) * refs: give detectors a Dockerfile's instructions, as java4shell does internal/refs/instructions.go, its test and the heredoc bodies in dockerfile.go are taken unchanged from the java4shell branch (PR #9, commit edb2f90), so nginxh2 can read RUN installs the way the builder reads them and the two branches merge without a conflict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md for the nginx HTTP/2 pair, CVE-2026-123007 and CVE-2026-123633 The fix commits on 1.31 and 1.30, the releases that brought the code in (1.9.5, 1.19.7), how each build names itself in its binary (read from the official, Debian, Ubuntu, Alpine and OpenResty binaries), and the status of every downstream on 2026-11-18: Docker official images fixed, Debian, Ubuntu, Alpine, OpenResty, Tengine, Angie and the unprivileged image not yet, ingress-nginx archived without a fix, Red Hat not read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: judge nginx binaries and their HTTP/2 exposure in filesystems and images (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: tests for versions, binaries, configuration, package databases and verdicts; follow symbolic links in include globs A site enabled through a symbolic link (sites-enabled/default -> ../sites-available/default, Debian's layout) was not matched by the include glob, so HTTP/2 on in it read as off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: gofmt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fuzz the configuration parser, the binary reader and the version comparisons FuzzInspect found a panic: a version line's build text with invalid UTF-8 was lowered with strings.ToLower, which changes its length, and an index into the lowered copy cut the original out of range. Only ASCII letters are lowered now; the input is kept as a regression case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: scan repo and fix (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: source-tree scan and fix scan repo finds the nginx images a tree names (official, unprivileged, OpenResty, Bitnami, ingress-nginx, F5 NGINX Ingress Controller, Angie; Dockerfile FROM with ARG tags, Compose, Kubernetes, Helm values including the ingress-nginx chart's registry/image/tag, CI), the nginx, OpenResty and Angie packages Dockerfiles install (apt, apk, dnf and yum name-version, dnf modules, through sh -c, subshells, xargs, heredocs, ARG and ENV), the Helm charts that depend on ingress-nginx, and the configurations (files, templates, ConfigMaps) that turn HTTP/2 on. Moving tags and digests are read from the registry on linux/amd64 and linux/arm64. fix moves a tag to the first fixed release of its line and variant after reading the target on each platform judged, checking it is published for every platform the tree builds (or the current tag has) and stays on the same base OS; it declines everything else with the reason, and prints the HTTP/2-off edit as an optional interim step it never applies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: Alpine's fixed package, generated ingress configurations, parity fixtures Alpine published nginx 1.30.7-r0 for 3.24 and edge at 17:06 UTC on the day of disclosure; 3.21 to 3.23 have no fixed package. The source-tree scan now reads the Alpine branch a base image names: an unpinned install on 3.24 or edge is decided at build time (a floor is suggested), on an older branch it is vulnerable, and a pin on 3.24 or edge is moved to 1.30.7-r0 by fix. The F5 NGINX Ingress Controller, like ingress-nginx, writes its configuration at start, so the one on disk does not decide exposure. parity/nginxh2.py builds and scans fixtures for exposure (TLS, cleartext, off, static, templates, -c, unread includes), hostile configurations, patched binaries (no version line, renamed, a version line alone edited, no HTTP/2), Debian, Ubuntu and Alpine packages, a filesystem export, a source tree and fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: parity against published images (39 cases) Official images before and after the fix on both lines and in perl, otel and alpine variants, on arm64 and 386, the 1.19.6 / 1.19.7 boundary of CVE-2026-123633, 1.18.0, 1.10.3, nginx-unprivileged, OpenResty, Bitnami, the ingress-nginx controller and the F5 NGINX Ingress Controller before and after 5.8.0, and fix against the registry. Tags before 1.10 are schema 1 manifests that no current client reads; the 1.9.5 boundary is covered by unit tests and a synthetic case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md records the F5 controller images read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: README entry, usage, layout, parity and fuzz commands Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fixes from the independent review Each of these could report "not exposed", or drop a reference, where the evidence did not support it: - template variables: the official entrypoint's substitution is applied with the image's environment; a variable left in listen or http2, or an http2 value other than on or off, makes exposure unknown - below a system root, include globs read the directory from disk with symbolic links (Debian's sites-enabled), follow links inside the root, and an unlistable directory leaves the list incomplete - a glob through a symbolically linked directory is complete only if the real directory is one the scan reads whole - globs follow glob(3): [!x] negates, wildcards skip dot files, a bad pattern is incomplete - nginx's socket semantics: ssl and http2 on any listen of a port, and the default server's http2 on, count for every server on it; a server without listen also counts *:8000 - -p moves a relative compiled-in configuration path; nginx started from a sh -c text is read, and one that cannot be read makes exposure unknown - a pulled image read in part whose servers were all fixed, and an nginx image with no nginx recognised, are reported as not checked - fix declines when the current tag's platforms cannot be listed (unless --platform names them) and when a single image would replace an index - the package databases and entrypoint scripts kept have a total cap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * engine, nginxh2: a scan can see what the walk did not read; nginxh2 never reads an unread include as off Review 2, finding 1: with --as-root (or at /), an include that could not be read (a mode 000 file or directory) was missing from what the detector kept, and a glob over it read as complete, so HTTP/2 read as off. The engine now hands a SkipVisitor scan the walk's not-scanned records, with paths inside the system root, before Finish. nginxh2 treats any such path, or a directory above it, as an unread include: exposure unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: exposure reads as off only when the command that starts nginx was read Review 2, finding 2: an image whose command does not start nginx itself (/init, a start script, forego, supervisord, a wrapper), a sh -c text that runs anything else first (sed, envsubst), or a custom script in /docker-entrypoint.d had the image's default configuration trusted, and read as not exposed. Now: - nginx's own option parsing is followed (-qc file, -cfile, -p, -g), and -g directives' includes are loaded like any other; - a sh -c text is read with quotes, escapes and line continuations; any command other than nginx (after exec, set, assignments), a substitution or a redirection makes exposure unknown; - the official entrypoint is trusted with its own four scripts only; - tini, dumb-init, env and exec pass through; any other wrapper, or no command, makes exposure unknown; - on a host, each binary's start command is its systemd unit's ExecStart with drop-ins applied; none, or several that differ, is unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: a deployment that changes an image's command or configuration leaves its exposure unknown Review 2, finding 3: scan repo read a moving tag's image and reported its own configuration's exposure (not exposed) at a Compose service that runs nginx -c with a mounted conf.d. A Compose service or Kubernetes container that sets command, entrypoint, args, volumes, volumeMounts, configs or environment, and a Dockerfile stage that builds on the image (COPY, RUN, CMD, ENV and the like after FROM), now make a weaker exposure from the image unknown, with the reason, at high severity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: unset template variables anywhere in listen, or standing for a directive, leave exposure unknown Review 2, finding 4: listen ${NGINX_LISTEN}; listen 443${H2OPTS}; and a placeholder ${EXTRA_HTTP} directive read as HTTP/2 off. Every listen argument, the address included, and any directive name that is a variable now make exposure unknown, as FACTS.md says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: a version on a line newer than any known is unknown, never fixed Review 2, finding 5: nginx/37.0.0, nginx/37.0.7 and nginx/2.0.0 read as fixed (a line after 1.31 'branched after the fix'), and the tag nginx:37.0.0 was cleared in a source tree. NGINX Plus now numbers its releases 37.x, so such a version line may be Plus's. A line above the newest known one (1.31; 37.3 for Plus's numbered releases; 5.8 for the F5 controller) is now unknown; Plus is judged only by its own rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: built without HTTP/2 needs both witnesses read whole; HTTP/2 on an older core is judged by its code Review 2, finding 6: a 1.9.7 build (no module list before 1.9.11) whose 4,451 bytes of configure arguments ended in --with-http_v2_module was cut at 4 KiB and cleared as built without HTTP/2. Now the configure arguments are read to their end (up to 64 KiB) and "no HTTP/2" needs them whole and the module list present; anything less is unknown. A build with HTTP/2 on a core older than nginx's own (1.9.5) is a vendor backport: NGINX Plus R7 on 1.9.4 and the like are unknown, not cleared. Tengine 2.1.2 to 2.2.x on cores 1.6.2 and 1.8.1, read in their one-line form (Tengine/2.2.2 (nginx/1.8.1)), carry nginx's unfixed flow-control code and predate the reuse change (alibaba/tengine source; it came with 2.4.0). Tengine's newest tag is reported as 3.2.0-rc5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: bound what all included files together make the loader parse Review 2, finding 7: a 1 MB file of short directives included 62 times (2 MB on disk, under every per-file cap) was parsed 62 times and took 3.85 GB and 90 s. The loader now has one token budget for every file it parses, each time it is included (2 Mi tokens), and 16 MiB of bytes in total; past either the configuration is not read in full and exposure is unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fix verifies a tag move on the FROM line's own --platform Review 2, finding 8: with --platform linux/amd64,linux/arm64, FROM --platform=linux/riscv64 nginx:1.31.8 was moved to 1.31.9, which had no riscv64 image, and the summary said it was published for every platform it must have. The FROM line's platform is now the one verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: nothing nginx-shaped in a source tree is passed over in silence Review 2, finding 9. Each of these gave no finding at all: - an image whose last path segment holds nginx but is no family the detector reads tags of (registry.example.com/nginx, a Harbor mirror, cgr.dev/chainguard/nginx), and Tengine, Kong and APISIX images: now a not-checked note, read from the registry when online; - COPY --from=nginx:1.31.8 and RUN --mount=...,from=: judged like a FROM, never edited by fix; an unresolved one is recorded as not checked; - nginx module packages (libnginx-mod-*, nginx-module-*), certbot's nginx plugin and Angie PRO: not-checked notes; - a Dockerfile, Compose file or other file the scan reads that is a symbolic link: recorded as not checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: POSIX classes in include globs, hard-linked sites, more ways to reach an upstream Review 2, lows 10 to 12: - include conf.d/[[:digit:]]*.conf missed 10-site.conf; glob(3)'s character classes are now read, and an unknown one leaves the list incomplete; - a site enabled through a hard link (an image layer's tar link) was not read; hard links are followed like symbolic links; - "HTTP/2 without a proxy" knew six *_pass directives; Lua handlers (cosockets, balancer), njs, redis/redis2/postgres/drizzle_pass, auth_request, mirror and perl now count as reaching an upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fix reads each image pair once, checks Alpine's index before moving a pin, labels the F5 move Review 2, lows 13 to 15: - the verifier is memoised per image pair and platform list, so three identical FROM lines read the images once; the unused pullTimeout is gone; - an apk pin is moved only after reading the branch's main APKINDEX (through the guarded transport): to the build it lists, only when that build is fixed, newer than the pin and on the pin's line; offline it is declined. alpine:edge's nginx=1.31.8-r0 is no longer moved down to 1.30.7-r0; - the F5 controller's move from 5.7 to 5.8.0 is called a minor upgrade of the same variant, not the same line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: wording without certainty; YAML read errors are not checked Review 2, lows 16 and 17: - a fixed verdict "reports a version with the fix" (it rests on the version alone); a backport row is "the build the distribution lists as fixed"; an unpinned nginx.org install no longer says what a build from a date gets (nginx.org's pages were not read), and Alpine's says what its index listed; - a YAML file that stops decoding, or holds more than 1,024 documents, is recorded as not checked instead of read up to the error in silence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fuzz the include glob and link resolver, templates, units, the start command and the package databases Review 2, low 18. FuzzSource found a panic in the glob(3) character class reader added for low 10: "[:]" closed on its own opening. The closing ":]" is now looked for after the opening; the input is kept as a regression case. FuzzStart and FuzzDatabases found nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md states the round-2 rules and the Tengine 2.x source facts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: parity expectations for images whose command does not start nginx ubuntu-pkg, alpine-pkg, alpine-3.23-pkg (a shell) and bitnamilegacy-1.29.1 (Bitnami's entrypoint script) now expect unknown exposure, unless the configuration shows HTTP/2 on, after review 2, finding 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: parity results after review 2 (39/39) Every row was produced by the round-2 build; the registry rows were rerun in batches after Docker Hub's anonymous pull limit stopped a full run part way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md cites the vendor pages the lead read on 2026-11-18 nginx.org's advisories and the 1.31.9 CHANGES entry (dated 18 Nov 2026, credits), Red Hat's CVE-2026-123007 page (CVSS 3.1 8.1, CWE-787, Bugzilla 2575895, no fixed products or errata; the CVE-2026-123633 page returned 404), Ubuntu's CVE-2026-123007 page (priority High, vulnerable 16.04 to 26.10, 14.04 not affected, no fixes) and the Debian tracker (no DSA or DLA). The Red Hat row moves from "not read" to "not fixed". No code change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: trust an entrypoint by its content, and its scripts only when all are read and official Verification 1: a script named docker-entrypoint.sh was trusted as the official entrypoint by its name, so one that seds http2 into the configuration read as not exposed; a symbolic link in /docker-entrypoint.d was not seen at all. The detector now keeps small #! scripts. A word that runs before nginx is passed over only when its content (followed through links) is one of the official nginx image's entrypoints, by SHA-256 of every version in nginx/docker-nginx and docker-nginx-unprivileged, and every .sh and .envsh entry the entrypoint runs from /docker-entrypoint.d (find -follow: links and hard links followed) was read and is that name's official script. A script not read, unread entries, a linked directory or any other content leave exposure unknown. The official files are kept in testdata (BSD 2-Clause, with their source). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: a host's systemd unit is read with every drop-in and override, or exposure is unknown Verification 2: below a system root a drop-in outside the walk was not read; an unreadable unit, drop-in or drop-in directory was passed over; a unit in /etc/systemd/system that is a symbolic link was ignored for the /usr/lib one; and an ExecStartPre script that writes the configuration read as not exposed. Units and drop-ins now come from the walk, the links and the not-scanned records, and below a system root from the unit directories on disk; the first directory with a unit wins, links are followed inside the target, a unit linked to /dev/null is masked. A unit, drop-in or directory that was not read, or an ExecStartPre, ExecStartPost or ExecCondition other than an nginx test (-t, -T), makes exposure unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: deployment changes reach the image through FROM aliases, Helm charts, Compose overrides and extends Verification 3: these still reported a pulled image's own "not exposed": - FROM nginx:1.29 AS base / FROM base / COPY h2.conf: the change is now recorded at the FROM that names the image, through any chain of stage aliases; - Helm values naming nginx: unknown when the chart's templates set volumeMounts, command, args or env, or are not in the tree; - Compose: a docker-compose.override.yml (or compose.override.yaml) that changes the service, extends and volumes_from; - a GitLab CI service with command, entrypoint or variables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: the template-variable check reads directive names only, as whole tokens Verification 4 (a regression from review 2, finding 4): a map key ending in $ (~*(bot|crawler)$) made exposure unknown in any configuration. The check now passes over map, geo, split_clients, types and charset_map blocks, which hold keys and values, and takes a directive name as a placeholder only when it is one ${NAME} or $NAME and nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: an older core whose HTTP/2 witness is cut or missing is unknown Verification 5: Tengine 2.2.2 (core 1.8.1) or NGINX Plus R7 (core 1.9.4) with cut configure arguments or no module list read as not affected by the core's age. A fork may carry HTTP/2 on such a core (Tengine 2.1.2 to 2.2.x do), so without a whole witness these are now unknown. Plain nginx before 1.9.5, whose source has no HTTP/2, stays not affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: an nginx call that tests, shows or signals is not the start Verification 6: in sh -c "nginx -t && sed -i ... && nginx -g 'daemon off;'" the first nginx was taken as the start, so the sed after it went unseen. Calls with -t, -T, -v, -V, -s, -h or -? are passed over (the sed is then seen and makes exposure unknown); a container command that only tests nginx is unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: bound the loader's and the include globs' time, not only memory Verification 7: - once the loader passes its byte, token or file limit it reads no further file (one record says so), so 220,000 include lines of a large file no longer read it from disk 220,000 times; - include globs look up the directory they name in an index (files, links, not-scanned records, files too large), built once, instead of matching every link of the target; a disk directory is listed once; globs with a wildcard in their directory part, which match every path, are capped at 64 per target and are incomplete past it (and below a system root); - the below-root branch no longer drops a not-scanned record found earlier in the same glob. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2, engine: verification nits - a tag on a line newer than any known (nginx:1.32.0, nginx-ingress:5.9.0) says so in its fix text, instead of "received no fix" or "not on the 5.x line"; - a pulled image whose exposure a deployment makes unknown no longer keeps the image's http2: off fact; - the verifier names where the platforms it needs came from (the FROM line's --platform, or the tree's --platform); - an engine-level test of SkipVisitor: the walk's gaps reach the scan before Finish with paths inside the system root, at and below it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md states the round-3 rules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * engine, nginxh2: resolve a relative command word as the runtime does before trusting it Round-3 verification 1: a relative entrypoint word was looked up at /, so ENTRYPOINT ["./docker-entrypoint.sh"] with WORKDIR /app, or ["docker-entrypoint.sh"] found through PATH in /usr/local/bin, was taken for the official /docker-entrypoint.sh when that file was still there. The image's working directory now reaches detectors (image.Opened WorkingDir, and an optional engine.WorkingDirer on the image's target context). A word with a slash is resolved against the working directory, a bare name through the image's PATH (Docker's default when it sets none); one that resolves to nothing makes exposure unknown, and the content check applies to the file it resolves to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: follow directory links inside /docker-entrypoint.d as find -follow does Round-3 verification 2: /docker-entrypoint.d/extra -> /opt/scripts was taken for a file the entrypoint ignores (no .sh suffix), but find -follow descends into it and runs what it holds. The walk now follows links to directories (64 at most, loops stopped), every .sh and .envsh it reaches must be read and official, and a link that leads to nothing the scan read makes exposure unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: apply a unit's Environment and EnvironmentFile to ExecStart; harmless commands around the start Round-3 verification 3: nginx.org's pkg-oss unit (ExecStart=/usr/sbin/nginx -c ${conffile} $cmdopts, Environment="conffile=...", EnvironmentFile=- /etc/sysconfig/nginx) had ${conffile} read as a literal path, so an exposed host read unknown. Environment= and EnvironmentFile= are applied as systemd applies them (the file overrides, $NAME splits into words, ${NAME} is replaced in place, unset is empty). /etc/sysconfig and /etc/default are kept whole; an EnvironmentFile not read, a required one that is not there, or an optional one outside what the scan reads makes exposure unknown. Round-3 verification 4: ExecStartPre=/usr/bin/rm -f /run/nginx.pid (the RHEL and Fedora unit, from the review; not confirmed here) made "not exposed" impossible. rm -f of the pid file (PIDFile= or *.pid) and nginx tests pass; any other command still makes exposure unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: read a Helm chart's templates in every subdirectory Round-3 verification 5: templates/web/deploy.yaml with volumeMounts left the values' image at its own not exposed; only files directly in templates/ were read. The templates are now walked recursively (4,096 at most); a template that cannot be read, a symbolic link among them or more than the limit makes exposure unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: index the unit directories once per scan Round-3 verification 6: every unit directory and drop-in directory looked through every link, file and not-scanned record of the target, so 3,000 units with 150,000 links took about 90 s. The names under the unit directories are now indexed once per scan and looked up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: below a system root, a wildcard-directory glob reads the disk Round-3 verification 7: include /opt/app/conf/vhosts/*/site.conf read exposed with --as-root and unknown with --root DIR DIR/opt, where such globs returned nothing. Below a system root they now walk the disk one part at a time with glob(3) matching (directories and links to them for the middle parts, files for the last), at most 20,000 entries; a directory that cannot be listed or that the walk did not read leaves the list incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: the missing-platform sentence reads whole Round-3 nit: "... which the FROM line's --platform (it may ..." had no verb. It now says which the current tag has, or which the tree's or the FROM line's --platform needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS.md states the round-4 rules and what a tree cannot show Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: fuzz the unit environment, the command resolver and the entrypoint walk Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: "not exposed" only when the start, the entrypoint and every configuration file were read Round-4 verification (job 1118-184956-3834), converging rule, closing findings 1 to 4. Exposure stays "not exposed" (and its severity drops) only when all of this holds; otherwise it is unknown: - the start is the nginx binary itself, or the official image's entrypoint (by SHA-256 of its content) given nginx or nginx-debug as its first argument; tini, env, a shell, any other wrapper are trusted by nothing the scan can check, so they are unknown (the sh -c reader is gone). The word that starts nginx is resolved as the runtime resolves it (working directory, PATH, links; a PATH search stops at the first entry that exists, link or not) and must land on the binary judged: a wrapper named nginx earlier on PATH, or ./nginx, is unknown (finding 2, finding 3). - every file reachable in /docker-entrypoint.d, whatever its name, size or first line, is recorded and kept as the walk sees it, and must have been read and be one of the official scripts by content; a directory link leading out of it is unknown (finding 1). The answer is computed once per scan. - templates are written only when the official entrypoint runs and is given nginx or nginx-debug, as it does (finding 4). - every configuration file was read, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: templates the scan cannot apply exactly leave exposure unknown Part of the round-5 rule: a template directory outside what the scan reads whole, or NGINX_ENVSUBST_FILTER (which narrows the variables the entrypoint puts in), makes exposure unknown instead of applying the templates as if they were complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: wildcard-directory globs keep links and read errors as incomplete Round-4 verification 5: below --root, the disk glob followed a link with an absolute target in the scanner's own filesystem, failed, and dropped it; a permission error on a directory was dropped too. Links are now kept as candidates for Read, which resolves them inside the root or reports them as not read; a linked directory on the way, or any error other than "does not exist", leaves the list incomplete. Round-4 verification 6: in an image or with --as-root, a wildcard- directory include through a linked directory matched nothing and read as complete. A link on the pattern's path (its starting directory or below) now leaves it incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: a timing test for the entrypoint walk Round-4 verification 7 (the walk went quadratic in links, once per binary) is fixed by the round-5 rule's walk, which is answered once per scan and cached per word: 100,000 links and 9 binaries take well under a second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: unit settings the scan cannot apply exactly leave exposure unknown Round-4 verification 8, 9, 10 and the PassEnvironment nit, under the round-5 rule: - a command around the start is harmless only as /bin/rm or /usr/bin/rm of the pid file, or a test by the very binary ExecStart runs; each of ExecStartPre, ExecStartPost and ExecCondition keeps its own list, so an empty one resets only itself; - a specifier (%) in an Exec, Environment, EnvironmentFile or PIDFile value, a glob in an EnvironmentFile path, a continued line, more than one ExecStart, an @, | or : prefix that changes how a line runs, and PassEnvironment, UnsetEnvironment, RootDirectory, RootImage, MountImages, ExtensionImages, ExtensionDirectories, BindPaths, BindReadOnlyPaths or TemporaryFileSystem are unknown; - an environment file line is no longer rewritten: "export", a continued line, an escape, a variable or an inner quote is unknown; - below --root, an optional environment file that is there but cannot be read is unknown, not absent; a unit or environment file over the kept size is recorded as not read instead of dropped; - a variable the unit does not set is empty only when the manager's settings were read and set no DefaultEnvironment= or ManagerEnvironment=, and no environment generator is there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: scan repo reads subchart templates and names links by tree path Round-4 verification nits: templates under charts/<sub>/templates render with the chart, so they are read like its own; a packaged subchart (.tgz) is not read and leaves the deployment unknown. A linked chart file is named by its path in the tree, not the host's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: the fuzzed launcher reaches the entrypoint directory walk Round-4 verification nit: the fuzz gave the entrypoint fuzzed content, which is never official, so the walk of /docker-entrypoint.d was never run. It now runs the official entrypoint with a fuzzed file and links in the directory, and fails if a file that is not official passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: FACTS and README state the round-5 rule for "not exposed" Round-4 verification 9 (wording): unit environment is no longer said to be applied "as systemd applies them"; FACTS lists the plain forms read and every setting that leaves exposure unknown, the strict start rule, the entrypoint directory and template conditions, and how globs below a system root treat links and directories that cannot be listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * nginxh2: parity under the round-5 rule; nginx-debug not started is unknown The official images install nginx-debug but their command starts /usr/sbin/nginx, so under the round-5 rule (the start must resolve to the very binary judged) nginx-debug is no longer cleared: its exposure is unknown, or exposed when what it would load turns HTTP/2 on. 17 cases' nginx-debug rows move accordingly; the nginx rows are unchanged. The reason now says which binary the command starts. 39/39 cases match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * engine: SkipVisitor gets the walk's gaps one record per path After the merge of #9 a path can have several records (two detectors that failed on it, a source record and a detector's), and the target merges them in finish. A SkipVisitor now gets them merged the same way, once per path with every reason. The gaps are taken once, before any Finish: a gap another detector reports at the end (FinishSkipper) is a file over that detector's own limit, which the SkipVisitor was shown, and whether it reached the SkipVisitor depended on detector order. Below the system root the walker's own records (a detector that failed on a file, an over-limit gap) already carry the path inside the root, while the source walk's are below the scanned directory; only the latter are moved into the root now. Before, a detector failure on /etc/nginx/x.conf in a scan of /etc reached nginxh2 as /etc/etc/nginx/x.conf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: fuzz the nginxh2 targets like the other fuzzers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
java4shelldetector for Java4Shell (CVE-2026-114938), the out-of-bounds write in HotSpot's x86-64 AVX-512 VBMI Base64 decode intrinsic (OpenJDK 17.0.6 and later).What it does
libjvm.so,jvm.dll,libjvm.dylib) andreleasefile, including jlink'd runtimes, runtimes bundled in products, and dpkg/apk/rpm packages. The verdict comes from the library's compiled-in version line and its ELF/PE/Mach-O architecture; the decoder's stub names show the vulnerable code is present. Only x86-64 is affected. Areleasefile alone does not clear a runtime.-XX:-UseBASE64Intrinsicsor-XX:UseAVX<=2in launcher variables, image env,setenv.sh,jvm.options, systemd units, Compose or Kubernetes env are reported as a fact on a finding that stays vulnerable. A container command that turns the decoder back on voids them.scan repo: DockerfileFROMand package installs, Compose/Kubernetes/Helm image references,setup-java,.tool-versions,.sdkmanrc,.java-version, Gradle and Maven toolchains.fix: moves image tags to the first fixed build of the same variant (checked by pulling the image, including its base OS) and bumps version files. Lines with no published fix are declined with the reason.FACTS.mdrecords sources, the fixed build per line (17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4), vendor status as of 2026-11-17, and what is still unknown. The CVE-to-JDK-8393212 mapping is inferred from the public write-ups; the OpenJDK and Oracle advisories could not be read.engine.HeadVisitorlets a detector see each file's first bytes (already read) without reading the file; panics in it are contained likeVisit.Verification
releasefile, the +1 build boundary and a source tree of install forms.Update: final head (d465d6c)
Everything below went through independent review rounds before landing here.
ID=rhel); every VM library in a runtime is judged and the worst verdict wins; OpenJ9 needs real evidence.BP_JVM_VERSION, Zulu numbers, Compose build arguments; anything that cannot be read is reported as not checked.detectors.jsonagree.go test -race(all but php2shell's SQLite tests, which cannot build on the build host and run in CI), all 37 fuzz targets, parity 43/43.🤖 Generated with Claude Code