Skip to content

Security: Sarv/Inbox

SECURITY.md

Security Policy

Sarv Inbox is an email client — it handles credentials, OAuth tokens, and the full contents of your mailbox. We take security reports seriously and appreciate responsible disclosure.

Supported versions

Security fixes are applied to the latest release on the main branch. Older versions are not maintained.

Version Supported
latest (main) ✅
older releases ❌

Reporting a vulnerability

Please do not open a public issue for security vulnerabilities.

Report privately via one of:

  1. GitHub Security Advisories (preferred) — use the repository's Security → Report a vulnerability tab. This keeps the report private until a fix is released.
  2. Email — support@sarv.com with the subject [Sarv Inbox] Security.

Please include:

  • A description of the issue and its impact.
  • Steps to reproduce (a minimal proof-of-concept if possible).
  • Affected version / commit and platform (macOS, Windows, Linux).

What to expect

  • Acknowledgement within 3 business days.
  • An initial assessment and severity rating within 7 business days.
  • Coordinated disclosure — we'll agree on a timeline and credit you in the release notes unless you prefer to remain anonymous.

Scope

Areas we consider especially sensitive (in-scope, high priority):

  • Credential / OAuth token storage and handling.
  • TLS/transport security for IMAP and SMTP connections.
  • Rendering of untrusted email content (HTML sanitization, sandboxing).
  • Handling of attacker-controlled links and external-URL opening.
  • Any path that could lead to remote code execution in the Electron process.

Out of scope: issues that require a already-compromised local machine, or that only affect unsupported/self-modified builds.

Thank you for helping keep Sarv Inbox and its users safe.

Local credential protection

New persistent secrets require the operating system's secure store: Keychain on macOS, DPAPI on Windows, or a supported Secret Service/KWallet backend on Linux. Inbox refuses new plaintext writes and Chromium's Linux basic_text fallback. Startup checks secure-store access before opening persistent app services and offers recovery instructions and an explicit restart when access is unavailable. On macOS, Inbox first requests authorization through Security.framework's native dialog. The app never collects the Mac login password or changes Keychain access controls. A successful unlock status is followed by an actual encryption and decryption check: macOS can report an unlocked Keychain while operations still fail. An in-app retry uses a fresh process when Electron has cached the failure. If macOS continues rejecting access, OS session recovery may still be required. Inbox does not reset or replace the user's Keychain.

Current secure-store availability and saved-data protection are separate facts. Security → Overview reports the database key and the saved credential, OAuth, AI, scanner and OpenPGP stores independently. An unavailable or failed check is not proof that existing encrypted data is plaintext. These checks return protection metadata only; they do not expose passwords, tokens, private keys or mail keys.

Older plaintext database keys remain readable for recovery. When OS protection is available, Inbox verifies and atomically rewraps the same key with owner-only permissions. It does not rotate the database key, reset the profile, replace unreadable encrypted keys, or leave a plaintext recovery copy. Existing Linux v10 ciphertext is treated as unprotected; v11 identifies the OS-backed form. Any separate legacy credential copies remain visible in the protection report.

Where sign-in tokens may be sent

An OAuth access token for a mail account also opens that mailbox, so the main process decides where each one may go. The window that renders mail and settings can name an address (a mail host, an AI address, the reputation service address), but the main process checks it against these rules before any token is read, and refuses anything else. The rules for mail hosts, Sarv's AI edge and Sarv's reputation service live in packages/core/src/oauth/token-destinations.ts.

  • Every provider's token goes to that provider's own OAuth endpoints (token refresh, user info, sign-out) and to its IMAP and SMTP hosts, including the aliases the provider documents.
  • A Gmail token also goes to the Gmail API at gmail.googleapis.com, which the main process calls itself to set label colours and Gmail's categories.
  • A Sarv token also goes to the LLM API on Sarv's AI edge hosts and to the catalog API the main process calls itself. It would also go to Sarv's reputation service (paths under /v1/reputation/), but that service is not running yet: no build has an address for it, so the token goes to no reputation address. The Blocklists address is a setting the window writes, and it is never trusted as a destination.
  • Any other address is refused with no request at all: no token is minted and nothing else is sent. A user who chose the reputation service gets no blocklist lookups and no spam reports. They do not switch to this computer's DNS instead.
  • Requests that carry a Sarv token to the AI edge, the catalog API or the reputation service do not follow redirects.
  • The environment variables that point Sarv's addresses at another server work in development builds only. A release build ignores them and logs that it did.

Dependency advisories

pnpm audit --audit-level=high runs on every push and pull request (.github/workflows/ci.yml, job "Dependency vulnerability scan") and fails the build on a high or critical advisory. Most are fixed by bumping the direct dependency; the rest by a pnpm.overrides entry in the root package.json, which is how a transitive package deep in someone else's tree gets pinned to a patched version.

A handful cannot be fixed that way. Those are listed in pnpm.auditConfig.ignoreCves in the root package.json — the only mechanism pnpm 8 offers — and every entry must be justified here. An undocumented entry is a bug: the point of the gate is that nothing high-severity is silently carried.

Reviewed 2026-12-03: pnpm audit --audit-level=high exits 0. The ignore list holds 18 CVEs, all in tar 7, published on 1–2 December 2026: CVE-2026-140230, CVE-2026-140231, CVE-2026-140234, CVE-2026-140235, CVE-2026-140236, CVE-2026-140238, CVE-2026-140239, CVE-2026-140240, CVE-2026-140241, CVE-2026-140244, CVE-2026-140245, CVE-2026-140246, CVE-2026-140247, CVE-2026-140248, CVE-2026-140249, CVE-2026-140250, CVE-2026-140251 and CVE-2026-140252. They cover symbolic links that escape the extraction folder, PAX headers that rename or resize an entry, and archives that exhaust memory or never finish. Every one is fixed only in tar 8, a rewrite with a new API.

  • The app's own tar is fixed. The desktop app unpacks extension archives with tar (extension-marketplace.ts, and scripts/prefetch-default-extensions.mjs when the build seeds the default extensions), and now requires tar 8.1.0.
  • What still has tar 7 is build tooling. electron-builder (through app-builder-lib) and node-gyp require ^7.5.7, including their latest releases (26.18 and 13.1), and call tar 7's stream API, so forcing tar 8 on them would break the build. Both are desktop devDependencies and neither ships in the app. app-builder-lib packs the project's own build output and unpacks the tool archives electron-builder downloads for itself. node-gyp unpacks the Node and Electron headers, which it checks against their published SHA-256 sums. A tar@7 override keeps them on 7.5.24, which fixes the one advisory 7.x did get a fix for, GHSA-ph3c-p786-j4rp.
  • The ignore list applies to every path, the app's own included, so the gate would no longer catch the app going back to tar 7. A unit test takes that job: apps/desktop/test/unit/electron/services/extension-archive-tar.test.ts fails if the tar that the installer or the seed script loads, or the desktop package's declared range, is older than 8.0.2.
  • Remove these entries when electron-builder and node-gyp move to tar 8. The non-blocking full report in CI shows them until then.

Fixed in the same review by overrides, all in tooling the desktop app does not ship: GHSA-ghv9-86vm-4v8m (critical, cross-spawn < 7.1.0, command injection when spawning a batch file on Windows), used by React Native's debugger, ESLint and electron-builder, is fixed by cross-spawn@7 ^7.1.2. GHSA-37g9-w4hg-h9qr (high, ws, unbounded automatic pong replies) is fixed by ws@7 ^7.5.14 for React Native and Metro, and by ws@8 ^8.23.1 for happy-dom, which runs the renderer tests. GHSA-6jpm-p5cq-9q44 (moderate, terser < 5.51.3, which Metro uses) is fixed by terser@5 ^5.51.4.

Reviewed 2026-11-19: pnpm audit --audit-level=high exited 0 with no ignore list. The list had been emptied because GitHub withdrew both advisories it held:

  • CVE-2026-93748, http-cache-semantics <= 4.2.0, withdrawn 2026-10-28. It was reached only through the build tool electron-builder.
  • CVE-2026-93687, braces <= 3.0.3, withdrawn 2026-10-23. It was reached only through tooling (ESLint, Tailwind, Metro, Jest).

GHSA-fc5q-39xc-vjpf (picomatch <= 4.0.7, high, no fixed version) failed the gate until GitHub withdrew it on 2026-11-18, so no entry was added for it. If a withdrawn advisory is ever reinstated, the gate fails again and it is reviewed here like any other.

The one advisory in a package the app ships was fixed by upgrading: GHSA-474x-hrwr-fgx4 (low, quadratic CPU when scanning unterminated stop-node tags) in fast-xml-parser <= 5.11.2, which reads the text of office attachments for the Inbox Agent. The app configures no stop nodes, so 1.4.11 and earlier never ran the affected code; the dependency and its override now require 5.12.0 or later.

Moderate, no fixed version these tools accept (below the gate, so not in ignoreCves; listed so the full report holds no surprises):

  • CVE-2026-118773, glob 9.0.0 to 14.0.1 (an aborted walk can keep reading the filesystem after its AbortSignal fires). Fixed only in 14.0.2. 13.0.6 comes from @electron/asar and @sentry/vite-plugin, both desktop devDependencies used while packaging. They walk the project's own build output and never cancel a walk to bound untrusted input. The same 13.0.6 also has CVE-2026-137196 (13.0.5 to 14.0.5, ignore patterns skip the brace-expansion limit; fixed only in 14.0.6). Its patterns come from the same build configuration.
  • CVE-2026-118764, minimatch 7.0.0 to 11.0.0 (denial of service through globparts amplification). Fixed only in 11.0.1. 9.0.9 comes from @typescript-eslint 6 (lint) and electron-builder → @electron/universal; 10.2.6 from @electron/asar, electron-builder → app-builder-lib and @sentry/bundler-plugins. Every pattern is one the project's own build or lint configuration supplies; none comes from mail or the user. The same versions also have CVE-2026-140006 (7.4.0 to 11.0.7, minimatch.escape() output can match more or less than the text; fixed only in 11.0.8). These tools escape no text from mail or the user.
  • CVE-2026-140237, tar 7 (a PAX size applied again to a later entry; fixed only in 8.0.0). Only the build tools' tar 7.5.24 has it, for the reasons given for the high tar advisories above.

Forcing any of them onto its new major line would be an incompatible major-version override on those tools. None of these packages is in the shipped app.

The 2026-10-12 review also listed two moderates that are now gone: CVE-2026-97058 (sprintf-js) was withdrawn on 2026-10-22, and CVE-2026-104844 (postcss-selector-parser) gained a 6.x fix, 6.1.5, which the postcss-selector-parser@6 override already requires.

The previous Vite exception (CVE-2026-53571) was removed: the desktop now uses Vite 8. The two image-size exceptions (CVE-2025-71329 and CVE-2025-71330) were also removed. The scoped metro@0.83 override updates that bundler to 0.83.8, which replaces the image-size dependency with vendored parsers; the other Metro line already omits it. No image-size package remains in the lockfile, and no incompatible major-version override is imposed on its consumers.

The CI job prints the full unfiltered report as a separate non-blocking step, so an ignored advisory getting a fix — or a new path appearing for one — is visible in the log rather than hidden by the ignore list.

There aren't any published security advisories