Skip to content

fix(security): drop the emSign roots behind CVE-2026-91403 from image JDKs - #36087

Merged
mohityadav766 merged 3 commits into
mainfrom
fix/cve-2026-91403-emsign-roots
Oct 23, 2026
Merged

mohityadav766 merged 3 commits into
mainfrom
fix/cve-2026-91403-emsign-roots

Conversation

@mohityadav766

@mohityadav766 mohityadav766 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Advisory

CVE-2026-91403 (CVSS 9.1, JSSE; OpenJDK advisory): eight eMudhra intermediate CAs were compromised, and Java still trusts them. Their chains end at three emSign roots that Temurin 21.0.13 removes from cacerts: emSign ECC Root CA - G3, emSign ECC Root CA - C3 and emSign Root CA - C1 (NSS 3.131.1, adoptium/temurin-build#4586).

Part of open-metadata/openmetadata-collate#7792.

Why a build step instead of a JDK bump

eclipse-temurin:21-jdk on Docker Hub is still Temurin 21.0.12.1. There is no 21.0.13 tag yet, and Temurin has not published 21.0.13 for aarch64 Linux. The 12 test hosts at https://emudhra.we-have-a-problem.com/ serve the compromised chains, and an image built from that tag today accepts all 6 that chain through emSign. Temurin 21.0.13+9 (x64) rejects all 12 because it drops these roots. This step does the same now, on both arches, and once the base is on 21.0.13 it deletes nothing.

Not the advisory's 16-fingerprint blocked.certs list: re-encoding an intermediate's ECDSA signature as (r, n−s) gives a certificate with a new fingerprint that still verifies under the issuer key. Temurin 21.0.12.1 with the 16 fingerprints added rejects EM DV TLS CA - G3B but still trusts its forged twin. With the roots removed, no variant has anything to chain to.

Change

  • docker/development/Dockerfile, docker/docker-compose-quickstart/Dockerfile: a step in the jre-builder stage, after jlink, against /javaruntime/lib/security/cacerts.
  • openmetadata-k8s-operator/Dockerfile: the same step against the eclipse-temurin:21-jre-alpine JDK, which is also 21.0.12.1. The image runs java directly, so Temurin's entrypoint, which can re-import system CAs, never runs.

The step deletes the three roots by SHA-256 rather than alias, then lists the store again and fails the build if any of them is still there.

Verification

Probe: a java.net.http GET to each of the 12 test hosts, plus www.google.com as a control, run with the image's own JDK.

Image Checked with Trusted roots eMudhra test hosts Control
docker/development real jre-builder stage build 115 (118 before) 12/12 rejected OK
docker/docker-compose-quickstart real jre-builder stage build 115 12/12 rejected OK
openmetadata-k8s-operator full image build with a stub jar 115 12/12 rejected OK
  • Step behaviour: a second run on a cleaned store deletes nothing and passes. With deletion disabled, the build fails with CVE-2026-91403: an emSign root is still trusted.
  • docker build --check: no warnings.
  • Not run: a full server image build (it needs openmetadata-dist). The step touches only the JDK trust store.

Review follow-up (f2b2521)

  • The step comment now says why it removes roots rather than adding the advisory's fingerprints to blocked.certs: an ECDSA signature re-encoded as (r, n−s) gives an intermediate a new fingerprint that still verifies.
  • Recorded as ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots (docs/decisions/) and cited from every step. The operator comment also says why it keeps java as its entrypoint.
  • docker/olivaw and docker/oss-scanner get the same step. Both run Maven on Temurin 21.0.11, pinned by digest (dbfd0852…), so they never pick up 21.0.13 on their own. On that base the step removes the three roots (144 → 141), and the probe rejects all 12 test hosts while the control still connects.
  • scripts/harness/check_decision_records.py: clean. docker build --check: no warnings on all five Dockerfiles.
  • The three SHA-256 values match crt.sh: emSign ECC Root CA - G3 (713604941), emSign ECC Root CA - C3 (713606976), emSign Root CA - C1 (713593222).

Operator unit tests (f45e27d)

k8s_operator-unit-tests was already red on main; this PR is the first to run it since. Two PRs that merged an hour apart on 2026-10-15 collided:

The explicit pin beat the BOM, so mockwebserver 4 ran against okhttp 5 core. All 7 tests that start the fixture failed with NoClassDefFoundError: okhttp3/internal/Util. The job only runs when openmetadata-k8s-operator/** changes, so nothing ran it after both merged.

Fix: drop the version, so the BOM holds mockwebserver on 5.5.0 alongside okhttp-jvm.

  • Locally, before the fix: the same 7 errors.
  • After: PodManagerLabelSelectionTest 5/5 and OMJobReconcilerTtlCleanupTest 2/2. The full operator suite passes 73/73, with fabric8's okhttp client now running against the mock server on okhttp 5.
  • CI's docker-image-smoke-test already built and smoke-tested the server image with the emSign step (DOCKER_RESULT: success).

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable defects were found.

Summary

The PR removes three emSign roots from five images’ Java trust stores and stops each build if a targeted root remains.

  • Five OpenMetadata images stop trusting chains through three emSign roots.
  • Operator tests use the root build's OkHttp version for their mock server.

Reviews (3) · Last reviewed commit: "fix(deps): let the okhttp BOM manage the..." · Reviewed by Greptile

… JDKs

eMudhra's compromised intermediates (CVE-2026-91403) chain to emSign ECC Root
CA - G3, emSign ECC Root CA - C3 and emSign Root CA - C1. Temurin 21.0.13
removes those roots from cacerts, but eclipse-temurin:21-jdk and
21-jre-alpine are still on 21.0.12.1, which trusts the compromised chains.

Delete the three roots by SHA-256 from the server images' jlink runtime and
from the k8s operator's JRE, and fail the build if any is still trusted. Once
the base images ship 21.0.13 the step deletes nothing.
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

Comment thread docker/development/Dockerfile Resolved
Review follow-up. The reason the step deletes roots instead of adding the
advisory's fingerprints to blocked.certs was only in the PR description: an
ECDSA signature re-encoded as (r, n-s) gives an intermediate a new fingerprint
that still verifies. Record it as
ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots, cite it
from each step, and note why the operator keeps java as its entrypoint.

docker/olivaw and docker/oss-scanner run Maven on a Temurin 21.0.11 base pinned
by digest, so they never pick up 21.0.13 on their own; give them the same step.
Comment on lines +23 to +25
- A Dockerfile that ships a JDK deletes a compromised CA's roots from that JDK's `cacerts`,
matched by SHA-256, and fails the build if any is still there. A jlinked runtime is fixed in
its builder stage, because a distroless runtime stage has no shell.

@gitar-bot gitar-bot Bot Oct 23, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Bug: rdf-store JDK still trusts the emSign roots the new ADR requires removed

The new Accepted record says: "A Dockerfile that ships a JDK deletes a compromised CA's roots from that JDK's cacerts... and fails the build if any is still there." docker/rdf-store/Dockerfile breaks that rule. It is built from eclipse-temurin:21-jre-jammy (line 2) and from eclipse-temurin:21-jdk-jammy (line 93), and docker/development/docker-compose*.yml builds it through context: ../rdf-store. It has no root-removal step, so until the base reaches 21.0.13 the Fuseki JVM still trusts eMudhra chains that end at the three emSign roots. The Dockerfile.fuseki-* variants under docker/docker-compose-quickstart/ have the same gap.

Fix: add the same RUN step after the fuseki-runtime FROM in docker/rdf-store/Dockerfile. Also confirm that /entrypoint.sh does not re-import the system CA store, which the ADR's third bullet forbids. If these images are meant to be out of scope, narrow the ADR's Decision to name the images it covers, so the record matches what the tree does.

Add the same step to the rdf-store runtime stage (after FROM eclipse-temurin:21-jre-jammy AS fuseki-runtime):

# CVE-2026-91403 (ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots)
RUN set -eu; \
    roots='86A1ECBA089C4A8D3BBE2734C612BA341D813E043CF9E8A862CD5C57A36BBE6B BC4D809B15189D78DB3E1D8CF4F9726A795DA1643CA5F1358E1DDB0EDC0D7EB3 125609AA301DA0A249B97A8239CB6A34216F44DCAC9F3954B14292F2E8C8608F'; \
    certs=$(keytool -list -v -cacerts -storepass changeit); \
    printf '%s
' "$certs" \
      | awk -v roots="$roots" 'BEGIN { split(roots, r, " "); for (i in r) want[r[i]] = 1 } /^Alias name:/ { alias = substr($0, 13) } /SHA256:/ { gsub(":", "", $2); if ($2 in want) print alias }' \
      | while IFS= read -r alias; do keytool -delete -cacerts -storepass changeit -alias "$alias"; done; \
    certs=$(keytool -list -v -cacerts -storepass changeit); \
    if printf '%s
' "$certs" | tr -d ':' | grep -qE "$(echo $roots | tr ' ' '|')"; then \
      echo "CVE-2026-91403: an emSign root is still trusted" >&2; exit 1; \
    fi

Was this helpful? React with 👍 / 👎

The operator's TTL-cleanup tests (#35513) start an in-memory Kubernetes API on
MockWebServer, pinned at mockwebserver 4.12.0, while #35557 moved okhttp to
5.5.0 through the root okhttp-bom. The explicit pin beat the BOM, so
mockwebserver 4 ran against okhttp 5 core and every test that starts the
fixture failed with NoClassDefFoundError: okhttp3/internal/Util. The two PRs
merged an hour apart on 2026-10-15, and the operator unit-test job is
path-filtered, so main stayed red until a PR touched
openmetadata-k8s-operator.

Drop the version so the BOM holds mockwebserver on 5.5.0 with okhttp-jvm.
@gitar-bot

gitar-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown
Code Review ⚠️ Changes requested 1 closed / 2 findings

🔴 High risk · Removing three emSign roots from five Java image trust stores changes TLS trust decisions; legitimate chains through them could fail validation.

Adds a build step to drop the three emSign roots behind CVE-2026-91403 from the JDK cacerts in the development, quickstart, and k8s-operator images, plus a decision record. Changes requested: the rdf-store image (docker/rdf-store/Dockerfile, plus the Dockerfile.fuseki-* quickstart variants) ships a JDK that still trusts the emSign roots, contradicting the new ADR. Add the same root-removal step there, confirm /entrypoint.sh does not re-import system CAs, or narrow the ADR's scope to the images it actually covers.

The ADR's Decision section is also open to fixing, since it currently states a rule broader than the tree enforces.

⚠️ Bug: rdf-store JDK still trusts the emSign roots the new ADR requires removed

📄 docs/decisions/2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots.md:23-25

The new Accepted record says: "A Dockerfile that ships a JDK deletes a compromised CA's roots from that JDK's cacerts... and fails the build if any is still there." docker/rdf-store/Dockerfile breaks that rule. It is built from eclipse-temurin:21-jre-jammy (line 2) and from eclipse-temurin:21-jdk-jammy (line 93), and docker/development/docker-compose*.yml builds it through context: ../rdf-store. It has no root-removal step, so until the base reaches 21.0.13 the Fuseki JVM still trusts eMudhra chains that end at the three emSign roots. The Dockerfile.fuseki-* variants under docker/docker-compose-quickstart/ have the same gap.

Fix: add the same RUN step after the fuseki-runtime FROM in docker/rdf-store/Dockerfile. Also confirm that /entrypoint.sh does not re-import the system CA store, which the ADR's third bullet forbids. If these images are meant to be out of scope, narrow the ADR's Decision to name the images it covers, so the record matches what the tree does.

Add the same step to the rdf-store runtime stage (after `FROM eclipse-temurin:21-jre-jammy AS fuseki-runtime`)
# CVE-2026-91403 (ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots)
RUN set -eu; \
    roots='86A1ECBA089C4A8D3BBE2734C612BA341D813E043CF9E8A862CD5C57A36BBE6B BC4D809B15189D78DB3E1D8CF4F9726A795DA1643CA5F1358E1DDB0EDC0D7EB3 125609AA301DA0A249B97A8239CB6A34216F44DCAC9F3954B14292F2E8C8608F'; \
    certs=$(keytool -list -v -cacerts -storepass changeit); \
    printf '%s
' "$certs" \
      | awk -v roots="$roots" 'BEGIN { split(roots, r, " "); for (i in r) want[r[i]] = 1 } /^Alias name:/ { alias = substr($0, 13) } /SHA256:/ { gsub(":", "", $2); if ($2 in want) print alias }' \
      | while IFS= read -r alias; do keytool -delete -cacerts -storepass changeit -alias "$alias"; done; \
    certs=$(keytool -list -v -cacerts -storepass changeit); \
    if printf '%s
' "$certs" | tr -d ':' | grep -qE "$(echo $roots | tr ' ' '|')"; then \
      echo "CVE-2026-91403: an emSign root is still trusted" >&2; exit 1; \
    fi
✅ 1 closed
✅ Quality: Root-removal rule for image JDK trust stores is not recorded in tree

📄 docker/development/Dockerfile:43-56 📄 docker/docker-compose-quickstart/Dockerfile:64-77 📄 openmetadata-k8s-operator/Dockerfile:6-19
This PR makes a security decision, and its reasoning is only in the PR description. Because the repo squash-merges, that description never reaches git log, and no file in docs/decisions/ covers JDK cacerts handling. The description gives three rules that the Dockerfile comments leave out:

  1. Distrust is done by deleting the emSign roots, not by adding the advisory's fingerprints to blocked.certs. Re-encoding an ECDSA signature as (r, n−s) gives a forged twin with a new fingerprint, so a fingerprint blocklist does not work.
  2. The operator image is only safe because it runs java directly. Temurin's entrypoint can re-import system CAs, and it never runs here.
  3. The step stays in place until every base image (21-jdk and 21-jre-alpine, on both arches) ships Temurin ≥ 21.0.13. After that it deletes nothing and can be removed.

Without a record, someone could later 'simplify' this into a blocked.certs entry, or switch the operator back to the Temurin entrypoint. Either change would bring the vulnerability back with no visible signal. The record should state: "Image JDKs distrust a compromised CA by deleting its root from cacerts by SHA-256 and failing the build if it remains. Fingerprint blocklists are not used because ECDSA signature malleability yields forged twins. Images that delete roots must not run Temurin's CA-import entrypoint. Revisit when all base images are on Temurin ≥ 21.0.13." Cite it from the three Dockerfiles as ADR:<date>-<slug>.

🤖 Prompt for agents
Code Review: Adds a build step to drop the three emSign roots behind CVE-2026-91403 from the JDK `cacerts` in the development, quickstart, and k8s-operator images, plus a decision record. Changes requested: the rdf-store image (`docker/rdf-store/Dockerfile`, plus the `Dockerfile.fuseki-*` quickstart variants) ships a JDK that still trusts the emSign roots, contradicting the new ADR. Add the same root-removal step there, confirm `/entrypoint.sh` does not re-import system CAs, or narrow the ADR's scope to the images it actually covers.
  
  The ADR's Decision section is also open to fixing, since it currently states a rule broader than the tree enforces.

1. ⚠️ Bug: rdf-store JDK still trusts the emSign roots the new ADR requires removed
   Files: docs/decisions/2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots.md:23-25

   The new Accepted record says: "A Dockerfile that ships a JDK deletes a compromised CA's roots from that JDK's `cacerts`... and fails the build if any is still there." `docker/rdf-store/Dockerfile` breaks that rule. It is built from `eclipse-temurin:21-jre-jammy` (line 2) and from `eclipse-temurin:21-jdk-jammy` (line 93), and `docker/development/docker-compose*.yml` builds it through `context: ../rdf-store`. It has no root-removal step, so until the base reaches 21.0.13 the Fuseki JVM still trusts eMudhra chains that end at the three emSign roots. The `Dockerfile.fuseki-*` variants under `docker/docker-compose-quickstart/` have the same gap.
   
   Fix: add the same RUN step after the `fuseki-runtime` FROM in `docker/rdf-store/Dockerfile`. Also confirm that `/entrypoint.sh` does not re-import the system CA store, which the ADR's third bullet forbids. If these images are meant to be out of scope, narrow the ADR's Decision to name the images it covers, so the record matches what the tree does.

   Fix (Add the same step to the rdf-store runtime stage (after `FROM eclipse-temurin:21-jre-jammy AS fuseki-runtime`)):
   # CVE-2026-91403 (ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots)
   RUN set -eu; \
       roots='86A1ECBA089C4A8D3BBE2734C612BA341D813E043CF9E8A862CD5C57A36BBE6B BC4D809B15189D78DB3E1D8CF4F9726A795DA1643CA5F1358E1DDB0EDC0D7EB3 125609AA301DA0A249B97A8239CB6A34216F44DCAC9F3954B14292F2E8C8608F'; \
       certs=$(keytool -list -v -cacerts -storepass changeit); \
       printf '%s
   ' "$certs" \
         | awk -v roots="$roots" 'BEGIN { split(roots, r, " "); for (i in r) want[r[i]] = 1 } /^Alias name:/ { alias = substr($0, 13) } /SHA256:/ { gsub(":", "", $2); if ($2 in want) print alias }' \
         | while IFS= read -r alias; do keytool -delete -cacerts -storepass changeit -alias "$alias"; done; \
       certs=$(keytool -list -v -cacerts -storepass changeit); \
       if printf '%s
   ' "$certs" | tr -d ':' | grep -qE "$(echo $roots | tr ' ' '|')"; then \
         echo "CVE-2026-91403: an emSign root is still trusted" >&2; exit 1; \
       fi

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@mohityadav766
mohityadav766 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 23815a7 Oct 23, 2026
80 of 83 checks passed
@mohityadav766
mohityadav766 deleted the fix/cve-2026-91403-emsign-roots branch October 23, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants