[PR #7903] [MERGED] fix(security): refuse certificates from the compromised eMudhra intermediates #7999

Closed
opened 2026-10-24 04:09:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7903
Author: @SpicyMarinara
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/emudhra-intermediate-block


📝 Commits (3)

  • c68c982 fix(security): refuse certificates from the compromised eMudhra intermediates
  • 590c8f3 Merge branch 'staging' into fix/emudhra-intermediate-block
  • fc8299c Merge branch 'staging' into fix/emudhra-intermediate-block

📊 Changes

3 files changed (+52 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/server/src/index.ts (+1 -0)
➕ packages/server/src/lib/compromised-certificate-authorities.ts (+49 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Refs #7900

Why this change

The private keys of eight eMudhra intermediate certificate authorities were stolen (https://emudhra.we-have-a-problem.com/). Browsers have blocked them since 17 October. Node.js merged its fix today (nodejs/node#66871), but no Node release includes it yet. Until one does, Marinara's server trusts certificates signed with those keys, so someone who holds a key and can intercept traffic could pose as an AI provider. Node v24.16.0 accepted the incident's test site. SpicyMarinara asked for the block to ship in v2.5.1 as a minimal fix.

What changed

  • New packages/server/src/lib/compromised-certificate-authorities.ts, imported first in index.ts. It wraps tls.checkServerIdentity, which tls.connect reads from the module object on every call (Node lib/_tls_wrap.js: checkServerIdentity: tls.checkServerIdentity) and passes the full peer chain. After Node's own hostname check, it refuses any chain containing one of the eight compromised public keys (SPKI SHA-256). Each key's Sectigo cross-sign shares it, so the cross-signed chains are covered too. Built-in fetch, undici (safeFetch/llmFetch) and https all connect through this.
  • Whole roots are not distrusted: AAA Certificate Services also vouches for many legitimate Sectigo sites.
  • A Pino warning names the host and the authority it refused.
  • CHANGELOG ## [2.5.1] → Install, updates and security: one line, since this ships in v2.5.1.
  • Marked ponytail:. Delete the file and its import once the bundled Node contains nodejs/node#66871.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent-run checks (boxes left for the human reviewer). The release owner asked for no test suite, so this was kept to a smoke check:

  • The eight hashes are the incident's impacted-intermediates.json list, recomputed from all 16 published certificates (8 intermediates, 8 cross-signs): 0 mismatches.
  • Smoke with the module loaded: https://dv-g3b-emudhra.we-have-a-problem.com/ is refused ("its certificate comes from EM DV TLS CA - G3B, a compromised certificate authority"). https://api.anthropic.com/ and https://openrouter.ai/ still connect.
  • tsc --noEmit for packages/server passes.
  • Not covered: separate processes such as the Claude Code CLI, git, the launchers and installers, and the Android app. They use their own trust stores and get the fix from their own updates.

Manual verification notes

  • Manually verify that a chat reply still streams from your usual provider after updating.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

None: no UI change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7903 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/emudhra-intermediate-block` --- ### 📝 Commits (3) - [`c68c982`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c68c98269e267bbfb4c200b4219f220e9321190e) fix(security): refuse certificates from the compromised eMudhra intermediates - [`590c8f3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/590c8f352e6bb8df57d55b53837658cab2734bf2) Merge branch 'staging' into fix/emudhra-intermediate-block - [`fc8299c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc8299c16e023f43e7d8ffadbca6a4805f937cb4) Merge branch 'staging' into fix/emudhra-intermediate-block ### 📊 Changes **3 files changed** (+52 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/server/src/index.ts` (+1 -0) ➕ `packages/server/src/lib/compromised-certificate-authorities.ts` (+49 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Refs #7900 ## Why this change The private keys of eight eMudhra intermediate certificate authorities were stolen (https://emudhra.we-have-a-problem.com/). Browsers have blocked them since 17 October. Node.js merged its fix today ([nodejs/node#66871](https://github.com/nodejs/node/pull/66871)), but no Node release includes it yet. Until one does, Marinara's server trusts certificates signed with those keys, so someone who holds a key and can intercept traffic could pose as an AI provider. Node v24.16.0 accepted the incident's test site. SpicyMarinara asked for the block to ship in v2.5.1 as a minimal fix. ## What changed - New `packages/server/src/lib/compromised-certificate-authorities.ts`, imported first in `index.ts`. It wraps `tls.checkServerIdentity`, which `tls.connect` reads from the module object on every call (Node `lib/_tls_wrap.js`: `checkServerIdentity: tls.checkServerIdentity`) and passes the full peer chain. After Node's own hostname check, it refuses any chain containing one of the eight compromised public keys (SPKI SHA-256). Each key's Sectigo cross-sign shares it, so the cross-signed chains are covered too. Built-in `fetch`, undici (`safeFetch`/`llmFetch`) and `https` all connect through this. - Whole roots are not distrusted: AAA Certificate Services also vouches for many legitimate Sectigo sites. - A Pino warning names the host and the authority it refused. - CHANGELOG `## [2.5.1]` → Install, updates and security: one line, since this ships in v2.5.1. - Marked `ponytail:`. Delete the file and its import once the bundled Node contains nodejs/node#66871. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent-run checks (boxes left for the human reviewer). The release owner asked for no test suite, so this was kept to a smoke check: - The eight hashes are the incident's `impacted-intermediates.json` list, recomputed from all 16 published certificates (8 intermediates, 8 cross-signs): 0 mismatches. - Smoke with the module loaded: `https://dv-g3b-emudhra.we-have-a-problem.com/` is refused ("its certificate comes from EM DV TLS CA - G3B, a compromised certificate authority"). `https://api.anthropic.com/` and `https://openrouter.ai/` still connect. - `tsc --noEmit` for `packages/server` passes. - Not covered: separate processes such as the Claude Code CLI, git, the launchers and installers, and the Android app. They use their own trust stores and get the fix from their own updates. ### Manual verification notes - Manually verify that a chat reply still streams from your usual provider after updating. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) None: no UI change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:32 +07:00
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#7999
No description provided.