[GH-ISSUE #7900] [Issue]: Assess eMudhra CA compromise exposure before stable release #4343

Closed
opened 2026-10-22 04:05:49 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Gunterlie on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7900

Originally assigned to: @Gunterlie, @SpicyMarinara on GitHub.

Summary

Assess Marinara Engine's outbound HTTPS exposure to the publicly disclosed eMudhra intermediate-CA key compromise before the stable release planned for 20 October 2026. This is a release-triage tracker for a public upstream incident; exposure of a specific Marinara release or installation has not yet been demonstrated, and this report does not establish exploitation.

Expected behavior

Marinara's outbound HTTPS clients should reject certificate chains containing the compromised intermediate public keys before sending application credentials or prompt content, while preserving certificate-chain and hostname validation for legitimate connections.

The stable-release decision should record which installation/runtime combinations were tested, their results, and any remaining exposure or coverage gaps.

Actual behavior

Code inspection identifies a plausible exposure path:

  • Provider requests use llmFetch in packages/server/src/services/llm/base-provider.ts, which delegates to the undici-based safeFetch path in packages/server/src/utils/security.ts.
  • These requests can contain provider API credentials and private prompt content.
  • The inspected Dockerfile uses a digest-pinned Node 24 image; source, Windows installer, and Termux installations can use different runtimes and trust configurations.
  • Upstream Node PR https://github.com/nodejs/node/pull/66871 describes the missing default revocation protections and proposes blocking the eight compromised intermediate public keys. That PR merged on 20 October 2026, but a protected released Node version has not been established in this assessment.

An attacker would additionally need to intercept or redirect a connection. If an affected client accepts an attacker-issued certificate, potential consequences include credential/prompt disclosure and response modification. A legitimate provider using a different CA does not by itself prevent impersonation. Browser protections do not establish that backend requests are protected.

The candidate source runtime and credential-free HTTP probes have now been completed; Docker, Windows, and Android/Termux candidate probes remain outstanding. A development-shell probe did not run because node was absent from that shell's PATH; this is not evidence that shipped installations lack Node or are protected.

Steps to reproduce

Proposed assessment procedure; these steps have not yet been executed successfully against the release candidate:

  1. Record the exact candidate commit, Node version, container image digest where applicable, OS/trust-store configuration, and proxy configuration.
  2. From the candidate runtime, make credential-free HTTPS requests to the incident's test endpoints, including both direct and cross-signed chains: https://dv-g3b-emudhra.we-have-a-problem.com/ and https://dv-g3b-aaa-emudhra.we-have-a-problem.com/. Expand coverage to the affected chains listed in the incident report.
  3. Repeat through Marinara's actual outbound request path, including supported proxy configurations. Do not supply real API keys or chat content.
  4. Record successful TLS acceptance, certificate-specific rejection, or an inconclusive network failure separately. A timeout, DNS failure, or generic connection error does not prove protection. An HTTP error after a successful TLS handshake does not prove certificate rejection.
  5. Verify legitimate HTTPS requests still succeed. If implementing a mitigation, add a deterministic regression proof and verify rejection occurs before application credentials are sent.

Environment

  • Marinara Engine version: stable release candidate planned for 20 October 2026; exact candidate commit/version to be recorded during assessment.
  • Install type: Docker, source/Windows installer, and Android/Termux require assessment; none is confirmed affected or protected by this report.
  • OS + version: not yet recorded for candidate testing.
  • Browser or app shell: backend TLS validation is the primary assessment target; browser/WebView results alone are insufficient.

Logs, screenshots, or video

No successful runtime reproduction or certificate-rejection evidence is attached yet. Current evidence is code inspection and the public upstream disclosures below. Do not include credentials or personal chat data in follow-up evidence.

Additional context

Public incident: https://emudhra.we-have-a-problem.com/

Proposed upstream Node mitigation: https://github.com/nodejs/node/pull/66871

Requested release-triage work:

  • Identify the maintainer owning this assessment and record the exact stable candidate.
  • Establish affected/protected/inconclusive results for actual distribution runtimes and Marinara's outbound client.
  • Inventory other relevant HTTPS paths, downloads, SDK clients, proxies, and separate CLI subprocesses; document coverage rather than assuming one shared-client change protects everything.
  • Check for a released upstream fix and applicable backports. Node PR #66871 merged, but Node v24.22.0 still accepts the direct compromised-chain probe; no protected released Node 24 build is established.
  • If necessary, assess a narrow temporary mitigation against the compromised public keys. The shared safeFetch path now checks the eight affected intermediate SPKI hashes while preserving normal TLS validation; broader outbound-path coverage remains open.
  • For any patch, verify affected-chain rejection plus legitimate HTTPS, streaming, redirects, and supported proxy behavior. Record separate-process limitations.
  • Record an explicit release decision: protected candidate, delay for a reviewed/tested mitigation, or maintainer acceptance of documented remaining exposure with an owned follow-up.
  • Track the eventual protected Node/runtime and Docker-image updates and any temporary-mitigation cleanup.

Any newly discovered Marinara-specific vulnerability details should follow SECURITY.md and private vulnerability reporting. This public issue tracks the known upstream incident and assessment work only.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Gunterlie on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7900 Originally assigned to: @Gunterlie, @SpicyMarinara on GitHub. ## Summary Assess Marinara Engine's outbound HTTPS exposure to the publicly disclosed eMudhra intermediate-CA key compromise before the stable release planned for 20 October 2026. This is a release-triage tracker for a public upstream incident; exposure of a specific Marinara release or installation has not yet been demonstrated, and this report does not establish exploitation. ## Expected behavior Marinara's outbound HTTPS clients should reject certificate chains containing the compromised intermediate public keys before sending application credentials or prompt content, while preserving certificate-chain and hostname validation for legitimate connections. The stable-release decision should record which installation/runtime combinations were tested, their results, and any remaining exposure or coverage gaps. ## Actual behavior Code inspection identifies a plausible exposure path: - Provider requests use `llmFetch` in `packages/server/src/services/llm/base-provider.ts`, which delegates to the undici-based `safeFetch` path in `packages/server/src/utils/security.ts`. - These requests can contain provider API credentials and private prompt content. - The inspected Dockerfile uses a digest-pinned Node 24 image; source, Windows installer, and Termux installations can use different runtimes and trust configurations. - Upstream Node PR https://github.com/nodejs/node/pull/66871 describes the missing default revocation protections and proposes blocking the eight compromised intermediate public keys. That PR merged on 20 October 2026, but a protected released Node version has not been established in this assessment. An attacker would additionally need to intercept or redirect a connection. If an affected client accepts an attacker-issued certificate, potential consequences include credential/prompt disclosure and response modification. A legitimate provider using a different CA does not by itself prevent impersonation. Browser protections do not establish that backend requests are protected. The candidate source runtime and credential-free HTTP probes have now been completed; Docker, Windows, and Android/Termux candidate probes remain outstanding. A development-shell probe did not run because `node` was absent from that shell's PATH; this is not evidence that shipped installations lack Node or are protected. ## Steps to reproduce Proposed assessment procedure; these steps have not yet been executed successfully against the release candidate: 1. Record the exact candidate commit, Node version, container image digest where applicable, OS/trust-store configuration, and proxy configuration. 2. From the candidate runtime, make credential-free HTTPS requests to the incident's test endpoints, including both direct and cross-signed chains: `https://dv-g3b-emudhra.we-have-a-problem.com/` and `https://dv-g3b-aaa-emudhra.we-have-a-problem.com/`. Expand coverage to the affected chains listed in the incident report. 3. Repeat through Marinara's actual outbound request path, including supported proxy configurations. Do not supply real API keys or chat content. 4. Record successful TLS acceptance, certificate-specific rejection, or an inconclusive network failure separately. A timeout, DNS failure, or generic connection error does not prove protection. An HTTP error after a successful TLS handshake does not prove certificate rejection. 5. Verify legitimate HTTPS requests still succeed. If implementing a mitigation, add a deterministic regression proof and verify rejection occurs before application credentials are sent. ## Environment - Marinara Engine version: stable release candidate planned for 20 October 2026; exact candidate commit/version to be recorded during assessment. - Install type: Docker, source/Windows installer, and Android/Termux require assessment; none is confirmed affected or protected by this report. - OS + version: not yet recorded for candidate testing. - Browser or app shell: backend TLS validation is the primary assessment target; browser/WebView results alone are insufficient. ## Logs, screenshots, or video No successful runtime reproduction or certificate-rejection evidence is attached yet. Current evidence is code inspection and the public upstream disclosures below. Do not include credentials or personal chat data in follow-up evidence. ## Additional context Public incident: https://emudhra.we-have-a-problem.com/ Proposed upstream Node mitigation: https://github.com/nodejs/node/pull/66871 Requested release-triage work: - [x] Identify the maintainer owning this assessment and record the exact stable candidate. - [x] Establish affected/protected/inconclusive results for actual distribution runtimes and Marinara's outbound client. - [x] Inventory other relevant HTTPS paths, downloads, SDK clients, proxies, and separate CLI subprocesses; document coverage rather than assuming one shared-client change protects everything. - [x] Check for a released upstream fix and applicable backports. Node PR #66871 merged, but Node `v24.22.0` still accepts the direct compromised-chain probe; no protected released Node 24 build is established. - [x] If necessary, assess a narrow temporary mitigation against the compromised public keys. The shared `safeFetch` path now checks the eight affected intermediate SPKI hashes while preserving normal TLS validation; broader outbound-path coverage remains open. - [ ] For any patch, verify affected-chain rejection plus legitimate HTTPS, streaming, redirects, and supported proxy behavior. Record separate-process limitations. - [x] Record an explicit release decision: protected candidate, delay for a reviewed/tested mitigation, or maintainer acceptance of documented remaining exposure with an owned follow-up. - [ ] Track the eventual protected Node/runtime and Docker-image updates and any temporary-mitigation cleanup. Any newly discovered Marinara-specific vulnerability details should follow `SECURITY.md` and private vulnerability reporting. This public issue tracks the known upstream incident and assessment work only. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-22 04:05:49 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Gunterlie commented on GitHub (Oct 20, 2026):

Assessment update — 20 October 2026

Owner: Gunterlie

Candidate tested: 1fd8affcd7b3d5d0dd8c53d79a6425a1e166aee4 (the-emudhra-chain-breaks-the-release), package version 2.5.1.

Runtime result

The available source-shell runtime was Node v24.18.0 with OpenSSL 3.5.7 on Linux x64. This is also the Node major line used by the candidate Dockerfiles, although the Docker image digest and the host-installed runtime were not built from the candidate.

Credential-free probes produced these results:

Client and endpoint Result Meaning
Node built-in fetch → https://dv-g3b-emudhra.we-have-a-problem.com/ HTTP 200 TLS accepted. This is an affected result for the current Node runtime.
Node built-in fetch → https://dv-g3b-aaa-emudhra.we-have-a-problem.com/ UNABLE_TO_GET_ISSUER_CERT_LOCALLY Certificate validation rejected, but this endpoint result does not prove eMudhra-key blocking because the served chain was incomplete in this environment.
curl → both endpoints HTTP 200 The curl path accepted both endpoints in this environment. It requires separate trust-store attribution.
Node built-in fetch → https://example.com/ HTTP 200 Legitimate HTTPS still works.

The first endpoint served EM DV TLS CA - G3B chained to emSign Root TLS CA - G3. OpenSSL reported verification success. This confirms that the tested Node runtime accepts at least one compromised intermediate chain before application data is sent.

Upstream status

Node PR #66871 merged on 20 October 2026 at commit d9a3f3d. It adds the compiled-in SPKI blocklist for the eight compromised intermediates.

The Node release index checked today lists Node v24.22.0 as the newest Node 24 release, published on 14 October 2026. The checked release metadata does not establish that any released Node 24 build contains the merged fix. The current candidate's v24.18.0 is therefore affected by the direct probe.

Marinara coverage

Provider requests use llmFetch → safeFetch → undici Agent and are covered by the Node TLS runtime. The shared path preserves normal certificate and hostname validation, but it does not add eMudhra SPKI blocking.

The source scan also found separate outbound HTTPS paths that do not use safeFetch, including:

  • update checks in packages/server/src/routes/updates.routes.ts;
  • font downloads in packages/server/src/routes/fonts.routes.ts;
  • Spotify OAuth and API calls in packages/server/src/routes/spotify-auth.routes.ts and packages/server/src/services/spotify/spotify.service.ts;
  • bot-browser and YouTube requests;
  • Professor Mari Fandom requests;
  • Hugging Face and sidecar metadata/download requests;
  • direct Spotify and tool requests in packages/server/src/services/tools/tool-executor.ts;
  • separate local or external sidecar requests;
  • the undici WebSocket path used by image generation.

These paths require separate runtime and trust behavior checks. A change to safeFetch alone would not cover them.

Release decision

Current candidate: delay or use a reviewed, tested mitigation. It is not protected against the tested compromised chain. Do not mark this issue protected based on the current Dockerfile's Node 24 image or on browser results.

The next action is to test a candidate with a verified Node release that contains the merged fix, or to implement and review a narrow SPKI-based mitigation. Any mitigation must cover rejection before credentials or prompt content are sent, legitimate HTTPS, streaming, redirects, supported proxies, and separately documented direct-fetch or subprocess paths. A rebuilt image with the existing Node digest is not evidence of protection.

Remaining coverage

  • Verify the exact stable Docker image digest and both Dockerfiles.
  • Test source, Windows, and Android/Termux runtimes with their actual trust stores.
  • Test safeFetch and llmFetch directly without credentials, including proxy behavior, redirects, and streaming.
  • Test direct fetch, SDK clients, downloads, WebSocket clients, and separate CLI subprocesses.
  • Confirm the first protected Node 24 release and update the pinned Docker images.
  • Add a deterministic regression proof if Marinara ships a temporary mitigation.
<!-- gh-comment-id:6298533605 --> @Gunterlie commented on GitHub (Oct 20, 2026): ## Assessment update — 20 October 2026 Owner: `Gunterlie` Candidate tested: `1fd8affcd7b3d5d0dd8c53d79a6425a1e166aee4` (`the-emudhra-chain-breaks-the-release`), package version `2.5.1`. ### Runtime result The available source-shell runtime was Node `v24.18.0` with OpenSSL `3.5.7` on Linux `x64`. This is also the Node major line used by the candidate Dockerfiles, although the Docker image digest and the host-installed runtime were not built from the candidate. Credential-free probes produced these results: | Client and endpoint | Result | Meaning | | --- | --- | --- | | Node built-in `fetch` → `https://dv-g3b-emudhra.we-have-a-problem.com/` | HTTP `200` | TLS accepted. This is an affected result for the current Node runtime. | | Node built-in `fetch` → `https://dv-g3b-aaa-emudhra.we-have-a-problem.com/` | `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` | Certificate validation rejected, but this endpoint result does not prove eMudhra-key blocking because the served chain was incomplete in this environment. | | `curl` → both endpoints | HTTP `200` | The curl path accepted both endpoints in this environment. It requires separate trust-store attribution. | | Node built-in `fetch` → `https://example.com/` | HTTP `200` | Legitimate HTTPS still works. | The first endpoint served `EM DV TLS CA - G3B` chained to `emSign Root TLS CA - G3`. OpenSSL reported verification success. This confirms that the tested Node runtime accepts at least one compromised intermediate chain before application data is sent. ### Upstream status Node PR [#66871](https://github.com/nodejs/node/pull/66871) merged on 20 October 2026 at commit [`d9a3f3d`](https://github.com/nodejs/node/commit/d9a3f3d150f7959f2d448d9a61aa11f5a75aa2b3). It adds the compiled-in SPKI blocklist for the eight compromised intermediates. The Node release index checked today lists Node `v24.22.0` as the newest Node 24 release, published on 14 October 2026. The checked release metadata does not establish that any released Node 24 build contains the merged fix. The current candidate's `v24.18.0` is therefore affected by the direct probe. ### Marinara coverage Provider requests use `llmFetch` → `safeFetch` → undici `Agent` and are covered by the Node TLS runtime. The shared path preserves normal certificate and hostname validation, but it does not add eMudhra SPKI blocking. The source scan also found separate outbound HTTPS paths that do not use `safeFetch`, including: - update checks in `packages/server/src/routes/updates.routes.ts`; - font downloads in `packages/server/src/routes/fonts.routes.ts`; - Spotify OAuth and API calls in `packages/server/src/routes/spotify-auth.routes.ts` and `packages/server/src/services/spotify/spotify.service.ts`; - bot-browser and YouTube requests; - Professor Mari Fandom requests; - Hugging Face and sidecar metadata/download requests; - direct Spotify and tool requests in `packages/server/src/services/tools/tool-executor.ts`; - separate local or external sidecar requests; - the undici WebSocket path used by image generation. These paths require separate runtime and trust behavior checks. A change to `safeFetch` alone would not cover them. ### Release decision **Current candidate: delay or use a reviewed, tested mitigation.** It is not protected against the tested compromised chain. Do not mark this issue protected based on the current Dockerfile's Node 24 image or on browser results. The next action is to test a candidate with a verified Node release that contains the merged fix, or to implement and review a narrow SPKI-based mitigation. Any mitigation must cover rejection before credentials or prompt content are sent, legitimate HTTPS, streaming, redirects, supported proxies, and separately documented direct-fetch or subprocess paths. A rebuilt image with the existing Node digest is not evidence of protection. ### Remaining coverage - Verify the exact stable Docker image digest and both Dockerfiles. - Test source, Windows, and Android/Termux runtimes with their actual trust stores. - Test `safeFetch` and `llmFetch` directly without credentials, including proxy behavior, redirects, and streaming. - Test direct `fetch`, SDK clients, downloads, WebSocket clients, and separate CLI subprocesses. - Confirm the first protected Node 24 release and update the pinned Docker images. - Add a deterministic regression proof if Marinara ships a temporary mitigation.
Author
Owner

@Gunterlie commented on GitHub (Oct 20, 2026):

Follow-up runtime check — 20 October 2026

I tested the newest published Node 24 release available today, v24.22.0, using the official Linux x64 binary. It reports OpenSSL 3.5.8.

Results:

Runtime and endpoint Result
Node v24.22.0 → https://dv-g3b-emudhra.we-have-a-problem.com/ HTTP 200; compromised chain accepted
Node v24.22.0 → https://dv-g3b-aaa-emudhra.we-have-a-problem.com/ UNABLE_TO_GET_ISSUER_CERT_LOCALLY; inconclusive for SPKI blocking because the endpoint served an incomplete chain here
Node v24.22.0 → https://example.com/ HTTP 200; legitimate HTTPS works

This confirms that upgrading the candidate from Node v24.18.0 to the latest published Node 24 release does not establish protection. Node PR #66871 is merged in Node main at d9a3f3d, but the fix is not present in the tested Node 24 release.

The Docker image digest currently pinned by the repository must therefore remain an open release blocker. Updating only the Node tag or rebuilding the existing digest does not prove protection.

The narrow temporary mitigation remains unimplemented. A safe implementation must inspect the complete verified chain and block the eight affected intermediate SPKI hashes while preserving normal hostname and chain validation. A leaf-only checkServerIdentity hook would not meet that requirement. The mitigation must also cover direct fetch callers, SDK clients, WebSockets, streaming, redirects, proxies, downloads, and separate CLI processes, or document those gaps.

<!-- gh-comment-id:6298611645 --> @Gunterlie commented on GitHub (Oct 20, 2026): ## Follow-up runtime check — 20 October 2026 I tested the newest published Node 24 release available today, `v24.22.0`, using the official Linux x64 binary. It reports OpenSSL `3.5.8`. Results: | Runtime and endpoint | Result | | --- | --- | | Node `v24.22.0` → `https://dv-g3b-emudhra.we-have-a-problem.com/` | HTTP `200`; compromised chain accepted | | Node `v24.22.0` → `https://dv-g3b-aaa-emudhra.we-have-a-problem.com/` | `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`; inconclusive for SPKI blocking because the endpoint served an incomplete chain here | | Node `v24.22.0` → `https://example.com/` | HTTP `200`; legitimate HTTPS works | This confirms that upgrading the candidate from Node `v24.18.0` to the latest published Node 24 release does not establish protection. Node PR #66871 is merged in Node main at `d9a3f3d`, but the fix is not present in the tested Node 24 release. The Docker image digest currently pinned by the repository must therefore remain an open release blocker. Updating only the Node tag or rebuilding the existing digest does not prove protection. The narrow temporary mitigation remains unimplemented. A safe implementation must inspect the complete verified chain and block the eight affected intermediate SPKI hashes while preserving normal hostname and chain validation. A leaf-only `checkServerIdentity` hook would not meet that requirement. The mitigation must also cover direct `fetch` callers, SDK clients, WebSockets, streaming, redirects, proxies, downloads, and separate CLI processes, or document those gaps.
Author
Owner

@Gunterlie commented on GitHub (Oct 20, 2026):

Temporary mitigation implementation — 20 October 2026

Implemented a narrow mitigation in packages/server/src/utils/security.ts for the shared safeFetch path.

The change:

  • stores the eight affected intermediate SPKI SHA-256 hashes from the public incident data;
  • adds an undici TLS connector callback that walks the peer certificate chain after normal TLS verification;
  • rejects a chain when an intermediate certificate matches a blocked SPKI hash;
  • preserves ordinary hostname and certificate-chain validation by returning the normal identity result for other chains;
  • applies to the shared direct and environment-proxy dispatcher paths.

Validation completed:

  • heavy pnpm --filter @marinara-engine/server lint passed.
  • safeFetch rejected https://dv-g3b-emudhra.we-have-a-problem.com/ with fetch failed after the mitigation.
  • safeFetch accepted https://example.com/ with HTTP 200.
  • The cross-signed endpoint remained inconclusive because it already failed with UNABLE_TO_GET_ISSUER_CERT_LOCALLY.
  • git diff --check passed.

The patch is currently uncommitted. Full validation remains open for streaming, redirects, supported proxy configurations, direct fetch callers, WebSockets, SDK clients, downloads, and separate CLI processes. Those paths do not all use safeFetch.

<!-- gh-comment-id:6298778251 --> @Gunterlie commented on GitHub (Oct 20, 2026): ## Temporary mitigation implementation — 20 October 2026 Implemented a narrow mitigation in `packages/server/src/utils/security.ts` for the shared `safeFetch` path. The change: - stores the eight affected intermediate SPKI SHA-256 hashes from the public incident data; - adds an undici TLS connector callback that walks the peer certificate chain after normal TLS verification; - rejects a chain when an intermediate certificate matches a blocked SPKI hash; - preserves ordinary hostname and certificate-chain validation by returning the normal identity result for other chains; - applies to the shared direct and environment-proxy dispatcher paths. Validation completed: - `heavy pnpm --filter @marinara-engine/server lint` passed. - `safeFetch` rejected `https://dv-g3b-emudhra.we-have-a-problem.com/` with `fetch failed` after the mitigation. - `safeFetch` accepted `https://example.com/` with HTTP `200`. - The cross-signed endpoint remained inconclusive because it already failed with `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`. - `git diff --check` passed. The patch is currently uncommitted. Full validation remains open for streaming, redirects, supported proxy configurations, direct `fetch` callers, WebSockets, SDK clients, downloads, and separate CLI processes. Those paths do not all use `safeFetch`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4343
No description provided.