Skip to content

Catch vulnerabilities in the language runtimes a team runs - #775

Merged
nambok merged 1 commit into
mainfrom
security-runtime-vulnerabilities
Nov 18, 2026
Merged

nambok merged 1 commit into
mainfrom
security-runtime-vulnerabilities

Conversation

@nambok

@nambok nambok commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

CVE-2026-114938 (a heap overflow in the JDK's java.util.Base64 decoder, AVX-512 VBMI intrinsic) matched nothing: a JDK is not a Maven package, a JDK unpacked into an image is not an OS package, SSM inventory was read for the kernel only, and nothing knew which CPU an instance runs on. CoderHelm now finds the runtimes a team runs in its code and its AWS accounts, matches them against the runtime project's own advisories, and says whether the advisory's hardware condition holds.

Live sources checked on 2026-11-18 before building: the OpenJDK advisory of 2026-11-17 lists the CVE (lines 17, 21, 25, 27; last affected 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, 27.0.1.0.3). ALAS2023-2026-3478 to 3481 and ALAS2-2026-4123 cover the Corretto packages: their text says 17.0.6 and later, x86-64, ARM64 not affected, and they list the fixed builds. OSV has no JDK ecosystem, only distribution openjdk-* source packages. The CPU feature (AVX-512 VBMI) and the flag -XX:-UseBASE64Intrinsics are not in any feed that can be read, so they live in a dated, sourced notes file.

Changes

  • common/src/runtime_vuln/ (new):
    • decls: runtime declarations from Dockerfile JDK/Node/Python/Go images, .java-version, .sdkmanrc, .tool-versions, .nvmrc, .python-version, go.mod toolchain, Gradle toolchains, Maven release, CI setup-* versions, and Lambda runtimes (Terraform, SAM/CloudFormation, Serverless, CDK). Each says whether it is an exact build or a line.
    • advisories: the OpenJDK index and pages parser, enrichment from the ALAS java advisories (start of affected range, hardware, flags, Corretto fixed builds, upstream fix), notes.json, and version standing.
    • findings: the repository findings, as dependency findings of the runtime ecosystem. A pull request is opened when a fixed build is known in the same form (an image's lowest fixed tag of the same variant from the registry's tag list, or a version file's upstream fix). A line, a floating tag or a republished tag gets a rebuild runbook. Findings close when the code no longer declares an affected build. An arm64-only image is kept at P3 with the reason.
    • cpu: EC2 instance family to architecture, CPU generation and AVX-512 VBMI.
  • infra_vuln:
    • SSM inventory reads every package (up to 100 instances, the first of each group first), not only the kernel.
    • Packages are matched against every non-kernel ALAS advisory: one runbook per source package, with the JVM flag.
    • Instance and node group types feed hardware tiers: P0 if internet-facing (else at least P1) when the condition holds, P3 with the reason and what moving would mean when it does not.
    • Lambda functions on a managed Java runtime are one AWS-managed row each.
    • ALAS pages keep their issue overview. SAM, CloudFormation and Serverless Lambda functions are read too.
  • Worker:
    • The OpenJDK feed is read daily after ALAS, keeping the last good copy, and appears in the Sources panel.
    • The repository sync reads runtime declarations and lists pinned images' tags.
    • Runtime findings skip code triage and OSV, and get their own ticket body.
  • No new IAM actions: ec2:DescribeInstances, eks:DescribeNodegroup and ssm:ListInventoryEntries already return the type, the architecture and the packages. The role template is unchanged.
  • Docs: docs/runtime-vulnerabilities.md. docs/self-host/requirements.md lists openjdk.org.

Verification

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace: all pass.
  • Replay tests on the pages as read on 2026-11-18 (runtime_vuln/testdata), each producing a finding for CVE-2026-114938:
    • a pinned eclipse-temurin:21.0.4_7-jre (PR to 21.0.13.1_2-jre when the registry has it) and a floating 21-jre;
    • .java-version 17.0.15 (PR to 17.0.21.1);
    • a Gradle toolchain, Maven release and setup-java 21;
    • a Lambda java21 (AWS-managed row);
    • SSM packages on m7i (P1, VBMI holds), m6g and m5 (P3, with the reason).
  • Negatives: Java 8, Java 11, 17.0.5, and 21.0.13.1 (images, version files, packages) produce nothing.
  • Mutation check: turning off version standing (8 tests), package matching (2), hardware tiers (2), or Lambda rows (1) fails the tests named.
  • cargo test -p common runtime_vuln::replay::live -- --ignored --nocapture against the live sources finds the CVE in every positive fixture and in none of the negatives.

A JDK is not a Maven package and a JDK unpacked into an image is not an
OS package, so CVE-2026-114938 in the JDK's Base64 decoder matched
nothing. Runtimes are now found in code (Dockerfile JDK images, version
files, Gradle and Maven, CI setup steps, Lambda runtimes) and on AWS
(every package SSM inventory lists, not only the kernel), matched against
the OpenJDK Vulnerability Group's advisories with what the Amazon Linux
java advisories add, and each finding says whether the CPU it runs on
meets the advisory's hardware condition.
@nambok
nambok merged commit 9fa7804 into main Nov 18, 2026
10 checks passed
@nambok
nambok deleted the security-runtime-vulnerabilities branch November 18, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant