Skip to content

[Bug] Browser cookie import silently imports 0 cookies on Chrome/Edge 140+ on Windows (v20 app-bound encryption) #13192

Closed

Description

@Aimeer-luo

Short summary:
On Windows, Orca's one-step browser cookie import returns 0 imported cookies for Google Chrome 140+ and Microsoft Edge 140+. The user-visible summary shows importedCookies: 0 and no error/warning, so the failure looks like a successful empty import.

This is caused by Chrome 140 (and Edge 140) defaulting to app-bound encryption (v20 prefix) for every cookie on Windows. Orca's decryption path only handles v10 on Windows, so every row fails to decrypt and is silently skipped.

Affected:

  • Google Chrome >= 140 on Windows
  • Microsoft Edge >= 140 on Windows
  • (macOS and Linux are not affected — Chromium still uses v10/v11 there, which Orca already handles.)

Orca version:
v1.4.176-rc.1 (reproduced on main; upstream stablyai/orca main at v1.4.163-rc.1 is also affected — neither branch handles v20).

How can we reproduce it?

  1. On Windows 10/11, install Google Chrome 140+ (or Microsoft Edge 140+).
  2. Sign into a Google account (or any other site) and confirm the session cookies are written to the profile's Cookies SQLite file.
  3. Fully close the browser (the import flow expects this; this is the recommended path).
  4. In Orca, open Browser Session Cookies → From <Chrome/Edge>.
  5. Pick the profile that owns the session.
  6. Observe the result: the summary reports importedCookies: 0 and totalCookies > 0. No error, no actionable message, just a silent zero.

What happens?

  • The diagnostic log (%APPDATA%/orca/cookie-import-diag.log) shows the rows are read successfully (encrypted_value length > 0) but decryptCookieValueRaw returns null for every row.
  • All rows are then counted as skipped, never as a failure, so the user sees a clean 0-cookie import.

Expected:

  • Either decrypt v20 (if feasible without the elevation service) — Chromium documents the app-bound key derivation, but it requires SYSTEM-level access via the browser's elevation service and is intentionally not decryptable from a normal user process, so this is effectively impossible from Electron.
  • Or, at minimum, detect the v20 prefix up front and surface a clear, actionable error to the user explaining why the import cannot proceed and what to do instead (export via a browser extension like Cookie Editor and use From File). Today Orca just silently returns 0, which is the worst UX.

Anything else that might help:
Root cause:

  • File: src/main/browser/browser-cookie-import.ts
  • Function: decryptCookieValueRaw(encryptedBuffer, keyResult)
  • On Windows (keyResult.mode === 'aes-256-gcm'), the function calls decryptAes256Gcm(encryptedBuffer.subarray(3), keyResult.key) regardless of the version prefix. If the prefix is v20, the GCM payload layout is different (app-bound encryption wraps the original v10 ciphertext with an OS-level DPAPI binding; the nonce/tag interpretation is wrong and decipher.final() throws). The try/catch swallows the error and returns null, which the caller treats as a benign skip.
  • The Windows branch only lists v10 (and, in a different revision, v20), but the production main branch has no v20 path and no early detection.

Background:

  • App-bound encryption was introduced in Chromium 127 as opt-in. Chrome 140 promoted it to the default for all cookies on Windows. See https://chromestatus.com/feature/5140822398443520 and the Chromium OS Cryptography docs.
  • Microsoft Edge tracks Chromium, so Edge 140+ has the same behavior.
  • This affects any tool that copies Cookies out of a live profile and tries to decrypt with the user's DPAPI master key — only the browser's elevated service can call IElevator::DecryptData and unwrap the app-bound layer.

Suggested fix:
At a minimum, scan the source rows up front. If a v20 prefix is detected, return a clear error such as:

Chrome (or Edge) is using app-bound encryption (v20) for its cookies, which prevents external import. Use a cookie export extension (e.g. Cookie Editor) to export cookies as JSON, then import via From File.

A patch for this already exists in a fork branch (d333135e6 — fix: detect v20 app-bound encryption and show actionable error) but it has not landed in upstream main. Reapplying it (or something equivalent) would at least turn the silent 0 into a clear, actionable error.

Out of scope (but worth noting):

  • True v20 decryption from Electron is not viable without the browser's elevation service, so a From File fallback (or asking the user to keep the browser running while exporting via its own UI) is the only honest path forward for Windows + Chrome/Edge 140+.
  • macOS and Linux remain unaffected; keep the v10/v11 paths intact.

Activity

  1. AmethystLiang commented on Aug 8, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. added
    bug
    os:macos
    os:linux
    on Sep 19, 2026
  3. added theissue type on Sep 19, 2026
  4. nwparker commented on Oct 18, 2026

    @nwparker
    Contributor

    The silent-zero-import bug is fixed by merged #14683. Current code detects Windows v20 cookies as app-bound encryption and shows a warning explaining that Orca cannot decrypt them, with From File… as the alternative. It also handles mixed causes without misattributing their counts.

    This satisfies the issue's explicit minimum requested outcome. It does not add app-bound decryption, which the report itself lists as out of scope. Although #14683 originally left this issue open because decryption was still unsupported, the current warning and file-import guidance address the actionable-error alternative requested here. I verified the current import and toast paths and reran the focused regression tests successfully.

    Closing this silent-success report as fixed; a future request for direct app-bound decryption would need its own feasible design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

browserbugos:Windowsos:linuxos:macos

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions