AUDIT_4.4.6.md

10.8 KB · raw

rendered · source

Peach Browser Extension — Security & Reliability Audit

Version: 4.4.6
Audit date: 2026-07-30
Scope: Full source audit (read-only), delta from v4.0.0
Auditor: Codex agent (GPT-5.6)
Prior audit: v4.0.0


Executive Summary

Peach v4.4.6 is fit for production. No critical or high-severity vulnerabilities were identified. The codebase demonstrates mature security engineering: a Rust-compiled Noise protocol core, per-entry authenticated encryption with key separation, constant-time comparisons at every authenticated site, Ed25519-signed device manifests with freshness windows, and a well-bounded sync receive path. The changes since v4.0.0 (recovery hardening, pairing/adoption, SAS verification, decentralized mesh convergence) are implemented safely and follow the established security patterns.


Findings by Threat Level

CRITICAL

None identified.

HIGH

None identified.

MEDIUM

M-1: Session key persisted in chrome.storage.session (accepted risk)

M-2: Tombstone accumulation without bound

M-3: Recovery words encode 128 bits of a 256-bit root key

LOW

L-1: console.log/console.warn statements in production code (76 instances)

L-2: No lint script configured

L-3: unlockWithKey accepts a raw hex key without Argon2id

L-4: HIBP breach check uses SHA-1 (dictated by API)

INFORMATIONAL

I-1: Duress slot size ceiling (256 KiB)

I-2: Subnet probe retired

I-3: E2E passkey bypass compile-time flag


Security Architecture Assessment

Cryptography ✅

Component Implementation Assessment
KDF Argon2id (m=64MiB, t=3, p=4) Exceeds OWASP password-manager tier
Vault encryption AES-256-GCM, random 96-bit nonce, 128-bit tag, AAD domain separation Correct
Per-entry sync encryption HKDF-SHA256 per entry ID, AES-GCM with entry-bound AAD Prevents slot-swap attacks
Key zeroing zeroKey() on all ephemeral/derived keys after use Consistent
Self-test PBKDF2+AES-GCM KAT on every unlock Catches broken WebCrypto
Cross-platform KAT Argon2id vector coordinated with Android BouncyCastle Prevents silent param drift

Protocol Security ✅

Component Implementation Assessment
Initial pairing Noise_NK_25519_ChaChaPoly_BLAKE2s (Rust snow → WASM) Correct pattern choice
Reconnect Noise_KK with both static keys, no NK fallback Prevents downgrade
Post-handshake auth HMAC-SHA256 bound to handshake hash + DH + domain separation Prevents session hijack
SAS 8-digit from handshake hash (64 PRF bits, negligible modulo bias) Correct
Device manifest Ed25519 signed, canonical JSON, ±freshness window, version-pinned Correct
Revocation Terminal, key-matched (not just id-matched), self-revocation filtered Prevents re-admission

Input Validation ✅

XSS / Injection Surface ✅

Reliability ✅


Delta Assessment (v4.0.0 → v4.4.6)

Change Area Versions Safety Verdict
Recovery flow hardening (try/finally, canvas ref fix) 4.0.x ✅ Safe
Onboarding reveal toggle + copy 4.0.x ✅ Safe
Playwright smoke tests (recovery, popup lifecycle) 4.0.x ✅ Safe
Pairing/adoption visual QA (QR, SAS, success states) 4.4.4–4.4.5 ✅ Safe (CSS/layout only)
CSS cascade fix (compact selector specificity) 4.4.5 ✅ Safe
Decentralized mesh convergence (deviceManifestVersion: 3) 4.4.6 ✅ Safe
Vouched trust source promotion (direct/vouched → equal authority) 4.4.6 ✅ Safe
SYNC_DEVICE_MANIFEST on equal entry versions 4.4.6 ✅ Safe

The mesh convergence change (v4.4.6) is the highest-risk delta. It was implemented correctly:


Production Worthiness

Verdict: APPROVED FOR PRODUCTION

The codebase demonstrates:

No blocking issues. The MEDIUM findings are accepted design tradeoffs with appropriate mitigations. The LOW findings are hygiene items that do not affect security posture.


Recommendations (non-blocking)

  1. Add a lint script (ESLint or Biome) to CI for ongoing hygiene.
  2. Consider pruning tombstones older than N months once all peers confirm receipt.
  3. Reduce console statements to structured debug logging behind a compile-time flag.
  4. Document the duress 256 KiB ceiling in user-facing materials for extreme vault sizes.

End of audit.