# Velvet Society dependency review

Reviewed 1 November 2026. This is a dependency and browser-bundle review for the current DogeOS **testnet** frontend, not a security audit, mainnet approval or certification of social-login completion.

## Release decision

Proceed with the current testnet frontend after the final build and browser/API checks pass. The four high-severity **leaf** packages reported by npm are absent from the actual Vite/Rollup browser output inspected below. Some lower-severity library code is shipped; its narrower exposure is documented rather than hidden. Keep these exceptions open and reassess before a mainnet release, SDK upgrade, new wallet adapter or enabling previously unused features.

The clean **root/server** audit must not be described as a clean audit of the entire application. After the compatible update below, `npm --prefix web audit --omit=dev` still reports **123 findings: 27 high, 30 moderate, 66 low, zero critical**. npm includes vulnerable installed packages and their dependent packages; these are not 123 independently exploitable bugs in the deployed browser.

## Compatible change applied

`web/package.json` overrides `@solana/web3.js@^1.0.0` to **1.99.0**. This removes the old exact 1.95.0 copy installed under `@tomo-inc/cubist-sig-sdk`, retaining the SDK's existing v1 public API and the root 1.99.0 copy already used by the frontend. The lockfile removes three packages; DogeOS SDK stays pinned at **4.0.4**. The existing discovery build script and earlier axios/protobuf/ws/bn.js/uuid overrides remain intact.

The maintained [Solana v1 source package](https://github.com/solana-foundation/solana-web3.js/blob/maintenance/v1.x/package.json) declares 1.99.0 and no longer depends on `bigint-buffer`. This removes one obsolete native-buffer dependency path, but `@solana/buffer-layout-utils` still brings `bigint-buffer` into the installed tree. It is therefore **not** a claim that the advisory has disappeared from the installation.

Validation after install: frontend TypeScript passes; the Solana `PublicKey` round trip passes; Jayson's browser client generated a UUIDv4 and completed an offline mock JSON-RPC exchange. No wallet secrets, authentication grants or onchain transactions were used. npm's high count moved from 28 to 27; total count remains 123 because one dependent package is now classified moderate.

## Evidence and scope

An actual programmatic Vite build used the repository's Vite configuration, with `build.write:false`, no public-directory copy, and a Rollup `generateBundle` inspection of every emitted chunk's module table. Only modules with `renderedLength > 0` counted as shipped. This includes lazy/dynamic chunks, not just the opening screen. The inspection did not overwrite `web/dist`.

Local evidence, ignored by git:

- `output/playwright/velvet-web-runtime-audit.json`: initial full npm audit.
- `output/playwright/velvet-web-runtime-audit-after.json`: audit after the compatible Solana override.
- `output/playwright/velvet-web-reachability-before.json`: actual included module paths and rendered byte counts.
- `output/playwright/velvet-runtime-audit.json`: separate root/server audit, zero findings at review time.

The reachability trace was taken immediately before removing the unused nested Solana copy. The included browser Solana module was already the retained root 1.99.0 package. The patch adds no dependency, adapter or browser import; the final production build remains a separate release check. Current SDK bundle SHA256: `9b9f1bab877110bddaf87633ae3111e5333f4056b544211355913cc0a46dadad`. Patched web lock SHA256: `d60b26e82aa714a383ce93fc8843cbf3425a7b8e8b44b184608855810a3d076b`.

The SDK distribution also has no embedded `ZodArray`, `EMOJI_REGEX`, `valibot`, `toBigIntLE`, `bigint-buffer` or `decodeUriComponent` marker. This is supporting evidence only; string absence alone is not treated as proof of safety. The module inclusion trace and inspected package entry points are the primary browser-path evidence.

## High-severity leaf findings

| Package and installed path | Advisory / upstream fix | Current browser evidence and decision |
| --- | --- | --- |
| `zod` 3.25.76 at `web/node_modules/zod` and 3.22.4 under `@reown/appkit-wallet` | [GHSA-mrhx-c7xc-m3w5](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5): oversized collection validation can exhaust memory; fixed 4.6.6. | No Zod module renders into any inspected chunk. Installed consumers include Coinbase CDP, Expo CLI and Reown's old wallet adapter. No patched 3.x release exists at review time. Do not force 4.x into consumers that require 3.x merely to silence npm. The server MCP separately uses patched 4.6.7. |
| `valibot` 0.36.0 through `@tomo-inc/cubist-sig-sdk` 1.1.0 → `@mysten/sui` 1.8.0 | [GHSA-vqpr-j7v3-hqw9](https://github.com/advisories/GHSA-vqpr-j7v3-hqw9): emoji-validator ReDoS, fixed 1.2.0. A separate [record/flatten issue](https://github.com/advisories/GHSA-5qjj-4xww-7phc) is fixed 1.4.2. | No Valibot, old Sui or Cubist module renders. The game config is DogeOS EVM. Do not replace 0.36 with 1.x without the upstream adapter migration and validation. Keep the installed-tree exception open. |
| `bigint-buffer` 1.1.5, retained through `@solana/buffer-layout-utils`/SPL packages | [GHSA-3gc7-fjrx-p6mg](https://github.com/advisories/GHSA-3gc7-fjrx-p6mg): native `toBigIntLE` buffer overflow; no upstream fixed release. | No bigint-buffer module renders. The package's `browser` mapping also points to `dist/browser.js`, a JS implementation without native bindings; `dist/node.js` is the affected native-capable path. Do not run these legacy optional Solana packages in a server process. The server handlers do not import them. |
| `decode-uri-component` 0.2.2 → `query-string` 7.1.3 → old WalletConnect 2.21 adapters | [GHSA-qr28-fpjm-wq7f](https://github.com/advisories/GHSA-qr28-fpjm-wq7f): malformed percent decoding can consume excessive CPU; fixed 0.5.1. | Neither decoder nor query-string renders. The published 0.5.1 package is ESM while the installed 0.2 consumer uses CommonJS; overriding across that module boundary without adapter changes can break wallet links. Do not force it. Reassess if the old adapters become included. |

Higher-level high entries for WalletConnect/Reown, wagmi connectors, Coinbase, Sui/Solana and Tomo propagate these leaf advisories. No known high leaf package was found in the inspected browser chunks. This is a statement about this build, not a permanent waiver for those dependencies.

## Included moderate and low findings

- **UUID 9.0.1 / Jayson 4.3.0:** Vite includes `web/node_modules/jayson/lib/client/browser/index.js` and `jayson/node_modules/uuid/dist/esm-browser/*` in the lazy Doge wallet runtime. Some UUIDv3/v5 code is present because the CommonJS client imports the UUID namespace. The inspected client selects `require('uuid').v4` and calls `uuid()` without an output buffer. The [UUID advisory](https://github.com/advisories/GHSA-w5hq-g745-h8pq) concerns v3/v5/v6 **API methods** with caller-provided buffers; it explicitly distinguishes v4. We found no current app/Jayson path invoking the affected variants. Do not claim those variants are absent from the bytes. Upgrading old UUID consumers to 11+ is a separate compatibility change.
- **stream-json:** npm propagates its advisories through Jayson's Node/server dependencies, but no stream-json module renders. The shipped browser client uses `JSON.parse`, not a stream-json parser. This observation does not justify using Jayson's affected server components elsewhere.
- **deepmerge 4.3.1:** `web/node_modules/deepmerge/dist/cjs.js` does render through HeroUI theme configuration. [GHSA-gcqx-w48m-w2h4](https://github.com/advisories/GHSA-gcqx-w48m-w2h4) has no patched upstream release at review time. The app supplies static SDK/brand theme configuration; room/profile uploads are strictly validated data and are not passed as theme configuration or arbitrary merge objects. No attacker-controlled theme input path was found. This remains a real open low-severity dependency exception, not a patched finding.
- **glob/minimatch tooling and optional adapters:** their audit findings remain in the installed graph; no glob/minimatch module renders in the trace. The old elliptic cryptographic-library advisory also remains in the installation; this review does not certify every optional cryptographic implementation. Retain the complete audit record and revisit the dependency graph if the build or supported chain families change.

## Follow-up triggers

Re-run both npm audits and the actual Vite module inclusion check whenever the SDK, wagmi/connectors, supported chains, RPC parsers, theme configuration or Vite settings change. Prefer an upstream compatible SDK/adapter release with corrected dependencies; do not use `npm audit fix --force`, downgrade DogeOS SDK to 3.x, substitute unreviewed crypto forks, or blindly upgrade Zod/Valibot majors.

Before mainnet, obtain a fresh dependency assessment, verify full mobile/social-wallet flows with the actual registered origin and resolve or explicitly accept any reachable remaining issues. This review does not certify third-party hosted wallet services or replace contract review.
