Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(security): record the real dependency and CSP posture in the audit
nirholas38baedc8747f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7406c3d2c..37f8b3214 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Code links in the docs no longer dead-end**: Documentation on three.ws cites the source constantly, and every one of those citations pointed nowhere: a link to a file like api/_lib/x402-spec.js was read as a page on the site, which does not exist, so it 404ed. Roughly 1,900 of them across the docs now open the real file on GitHub in a new tab instead. Cross-document links that also point at a heading work too: they take you to the right document and scroll to the right section, where before they did not move at all. (`/docs`) `[fix, docs]`- **Compressed 3D models can be inspected again**: Most three.ws avatars are geometry-compressed, and the model inspector could not read that compression, so quality checks failed on the majority of real models and the paid model-check service returned an error for them. The decoder is now loaded when a compressed model actually arrives. `[fix]`- **Deploying an agent on-chain no longer creates a duplicate or a hollow one**: Three things broke the on-chain deploy flow. Preparing a registration failed outright on any setup without IPFS pinning, which is the normal one. A bio longer than 280 characters was rejected even though agent bios allow 500. And deploying an agent you already had created a second, separate agent instead of putting the existing one on-chain. All three are fixed, a freshly deployed agent now appears in the public registry directory the moment its transaction confirms instead of waiting for the next crawl, and a deploy with no avatar attached is stopped with a link to add one rather than minting a body-less identity. `[fix]`+- **Every critical security advisory in the platform's open-source dependencies is cleared**: three.ws is built on several thousand open-source packages, and a review of them found three critical and 41 high-severity published advisories in what production actually ships. Most of them traced back to a single Solana library that four parts of the codebase listed as a requirement and none of them ever imported: removing it took an entire chain of outdated HTTP, form-parsing and file-upload libraries with it, including the two criticals. The third came from an old copy of a data-encoding library buried under the BNB Greenfield storage SDK, now collapsed onto the patched release. Everything else that had a compatible fix is pinned to it, and the image-processing library was moved up a version to pick up patched libvips. Production now carries zero critical advisories and 18 high, down from 41. What remains is the handful whose maintainers have not published a fix at all: those are named explicitly in the security audit so they can be re-checked rather than quietly forgotten. Two tools that several maintenance scripts had been relying on by accident are now declared properly, so those scripts keep working. Nothing about how the site looks or behaves changes here; this is about what runs underneath it. (`/docs/security`) `[security, infra]`- **File uploads work again across speech, vision, and 3D endpoints**: Uploading a file directly to the API silently arrived empty. Sending a .glb to the 3D inspector, a .wav to speech-to-text, an image to vision, audio to the face animator, a GLB to Material Studio, or a voice sample to voice cloning all answered as though you had sent nothing at all. The cause was the server treating "the whole request has arrived" as "somebody already read it", so it discarded bodies that were sitting there ready to read. Every one of those endpoints now receives the bytes you send. Uploads over the size limit also return a readable 413 instead of dropping the connection. `[fix]`- **Filtering the x402 service catalog by price or asset now behaves**: Passing a price cap like 0.01 to the service catalog returned a server error, and filtering by an asset symbol like USDC silently returned nothing, because the filter compared against raw contract and mint addresses. Both were exactly what our own tool descriptions told people to send. Prices are now validated at the door with a clear message stating the units, asset filters accept a symbol or a raw address, and the tool descriptions were corrected to match. `[fix]`- **Forge accepts six reference photos, and the docs finally say so**: Every page describing image to 3D said Forge takes one to four reference views. It takes six. The docs, tutorials, README and the paid catalog listing were all turning away two views the API accepts, and the listing now reads the real number from the code rather than restating it. `[docs]`diff --git a/data/changelog.json b/data/changelog.jsonindex 7980c45c8..622a7fe06 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,16 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-08-06",+ "title": "Every critical security advisory in the platform's open-source dependencies is cleared",+ "summary": "three.ws is built on several thousand open-source packages, and a review of them found three critical and 41 high-severity published advisories in what production actually ships. Most of them traced back to a single Solana library that four parts of the codebase listed as a requirement and none of them ever imported: removing it took an entire chain of outdated HTTP, form-parsing and file-upload libraries with it, including the two criticals. The third came from an old copy of a data-encoding library buried under the BNB Greenfield storage SDK, now collapsed onto the patched release. Everything else that had a compatible fix is pinned to it, and the image-processing library was moved up a version to pick up patched libvips. Production now carries zero critical advisories and 18 high, down from 41. What remains is the handful whose maintainers have not published a fix at all: those are named explicitly in the security audit so they can be re-checked rather than quietly forgotten. Two tools that several maintenance scripts had been relying on by accident are now declared properly, so those scripts keep working. Nothing about how the site looks or behaves changes here; this is about what runs underneath it.",+ "tags": [+ "security",+ "infra"+ ],+ "link": "/docs/security"+ },{"date": "2026-08-06","title": "The agent payment ring can refill its own spending float again after eight days stuck",diff --git a/docs/security/SECURITY_AUDIT.md b/docs/security/SECURITY_AUDIT.mdindex 8718f186d..84562b5c5 100644--- a/docs/security/SECURITY_AUDIT.md+++ b/docs/security/SECURITY_AUDIT.md@@ -52,15 +52,37 @@ dependency hardening**.- No-fix transitive cluster: `undici`, `bigint-buffer`, `@solana/spl-token`,`@solana/buffer-layout-utils` — track upstream.-**Remediation:** `npm audit fix --omit=dev` clears ~16 advisories (175 → 159) via-semver-compatible bumps, but in this monorepo it also reformats ~57k lines of-`package-lock.json` (npm version skew) — an unreviewable diff that conflicts with-concurrent work. So dependency bumps are deliberately **isolated to their own PR**:-run `npm audit fix --omit=dev` on a clean branch, review, and land separately.-The `@metaplex-foundation/[email protected]` breaking bump (clears axios/form-data/aptos)-and the no-fix Solana cluster (`undici`, `bigint-buffer`, `@solana/spl-token`)-are tracked upstream. **Status: tracked (isolated dependency PR) — command-verified to reduce counts; not bundled into this security changeset.**+**Remediation (landed 2026-08-06):** the breaking `@metaplex-foundation/js`+bump turned out to be unnecessary. That package was declared by four workspaces+(`agent-payments-sdk`, `character-studio`, `mcp-server`, `multiplayer`) and+imported by none: the codebase mints through `umi` + `mpl-core`, and the only+reference left was a commented-out import. Dropping it removes the whole+`aptos` → `[email protected]` / `[email protected]` / `@irys/sdk` subtree, which is where+two of the three criticals lived. The third (`protobufjs`) came from two+`6.11.6` copies under `@confio/ics23` and `@bnb-chain/greenfield-cosmos-types`,+collapsed by a global `protobufjs: ^7.6.5` override. `wrangler` (unused, in the+vendored studio fork) went with them, taking `miniflare` and its `undici`.++Semver-compatible pins for the rest live in root `overrides`: `axios ^1.18.1`,+`ws ^8.21.0`, `tmp` under `solc`, `bn.js` under `ethjs-unit` / `number-to-bn`,+`cookie` under `@sentry/node`, `undici` under `hardhat` / `eas-sdk`, plus a+direct `sharp` bump to `^0.35.3` (libvips CVEs). Regenerating the lockfile with+npm 11 produced a reviewable diff, not the 57k-line reformat the original+remediation feared.++Production tree: **3 critical / 41 high / 128 total → 0 critical / 18 high /+82 total**. Full tree including dev: 0 critical / 19 high.++Two packages had been resolving only as hoisted transitives of the removed+subtree, so they are now declared devDependencies: `dotenv` (seven root scripts)+and `puppeteer` (`scripts/verify-ibm-pages.mjs`).++**Still tracked upstream, no non-breaking fix published:** `bigint-buffer` (and+therefore the `@solana/buffer-layout-utils` → `@solana/spl-token` cluster),+`adm-zip` and `undici@5` under `hardhat` (a build tool pulled in as a runtime+dependency by `@ethereum-attestation-service/eas-contracts`, never executed on a+request path), `lodash.set` under the greenfield SDK, and `@libp2p/kad-dht`+under `helia`. **Status: fixed (0 critical); residue tracked.**---@@ -190,8 +212,28 @@ allowlist multiplies supply-chain exposure.**Remediation:** move toward nonce/hash inline allowance; scope `'unsafe-eval'`to the routes that genuinely need WASM/shader compilation; trim the CDN-allowlist; remove the duplicate `https://three.ws`. **Status: partially fixed-(CDN trim + dedupe + scope); nonce migration tracked.**+allowlist; remove the duplicate `https://three.ws`.++`'unsafe-inline'` is gone as of 2026-08-06. `server/csp-hashes.mjs` rewrites the+`script-src` of every HTML response to list the SHA-256 hashes of the inline+scripts in the bytes actually being sent. Hashes rather than a nonce because+HTML is cached at the CDN edge, where a per-request nonce and a cached document+disagree. Hashes cannot cover an inline event handler or a `javascript:` URL, so+those were removed site-wide and `scripts/audit-inline-handlers.mjs` (registered+in `data/guards.json`, wired into `npm run gate`) fails the build if one returns.++`'unsafe-eval'` remains, and is the weakest link now that inline injection is+closed. It cannot simply be dropped: the shipped bundles carry three distinct+`new Function` users. Two degrade gracefully when eval is blocked (the msgpack+and protobuf JIT in `colyseus-connect` sets its codegen threshold to Infinity on+a failed feature test; pdf.js gates on `isEvalSupported`), but the `cwise`+codegen inside the main `index` bundle and the `new Function` in+`public/scene-studio/{app/app.js,libs/acorn/acorn.js}` do not. Scoping it needs+`'wasm-unsafe-eval'` globally, `'unsafe-eval'` kept on `/scene-studio`, and a+`cwise`-free path for the main bundle, verified by a real browser sweep+(`npm run audit:web`) rather than by reading headers. **Status: `'unsafe-inline'`+fixed (per-response hashes); CDN trim + dedupe done; `'unsafe-eval'` scoping+tracked with the plan above.**### H13 — Wildcard CORS on ~25 authenticated handlersHand-rolled `Access-Control-Allow-Origin: *` on session-authenticated handlers.diff --git a/docs/security/SECURITY_REMEDIATION.md b/docs/security/SECURITY_REMEDIATION.mdindex ddf15a88b..734c9c79a 100644--- a/docs/security/SECURITY_REMEDIATION.md+++ b/docs/security/SECURITY_REMEDIATION.md@@ -16,7 +16,10 @@ Statuses are kept in sync as each item lands.6. **pump-fun-mcp** — per-call settle, bearer scope, image SSRF, per-principallimit (H7, M6).7. **Headers** — frame-ancestors/X-Frame-Options (H11), Permissions-Policy (M14),- CSP trim/dedupe (H12), CORS audit (H13).+ CSP trim/dedupe (H12), CORS audit (H13). `'unsafe-inline'` came out on+ 2026-08-06 via per-response script hashes (`server/csp-hashes.mjs`);+ `'unsafe-eval'` scoping is the one piece still open, and SECURITY_AUDIT.md+ H12 records what has to move first.8. **Missing rate limits / auth** — oracle/social (M3), ibm/attest (M4), persona(M5), forever/inscribe (M9), render endpoints (L10), misc Low.9. **Payment concurrency** — idempotency NX (M10), USD spend cap atomic (H9),@@ -26,7 +29,8 @@ Statuses are kept in sync as each item lands.(M12), skill spend cap (M13).12. **CSRF on cookie mutations** (M15), Solidity SafeERC20 (L2), remaining Low.13. **Client secret exposure** — VITE_PINATA + RPC keys (H10).-14. **Dependencies** — non-breaking `npm audit fix` (C1); track breaking bump.+14. **Dependencies**: remove the unused packages that carry the criticals, pin+ the rest through root `overrides` (C1); track what upstream has not fixed.## Migration notes@@ -35,7 +39,11 @@ Statuses are kept in sync as each item lands.version tag: legacy records decrypt with the old derivation; new writes use`WALLET_ENCRYPTION_KEY` + a random per-record salt embedded in the payload. Nodata migration required; records re-encrypt opportunistically on next write.-- **C1 (breaking dep bump):** `@metaplex-foundation/[email protected]` clears the- axios/form-data/aptos chain but is a breaking major; validate mint/metadata- flows before landing. Tracked separately, not in the same change as the- surgical fixes.+- **C1 (landed 2026-08-06):** the breaking `@metaplex-foundation/js` bump was+ never needed. The package was declared by four workspaces and imported by+ none, so it was removed outright along with its `aptos` / `[email protected]` /+ `[email protected]` subtree, and the last critical (`[email protected]` under+ the greenfield cosmos types) fell to a global `protobufjs: ^7.6.5` override.+ The production tree went from 3 critical / 41 high to 0 critical / 18 high.+ `bigint-buffer`, `adm-zip`, `lodash.set`, `undici@5` under `hardhat`, and+ `@libp2p/kad-dht` have no non-breaking upstream fix and stay tracked.diff --git a/public/changelog.json b/public/changelog.jsonindex 592045cad..b553f1701 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-06T04:33:48.203Z",+ "generated_at": "2026-08-06T04:36:18.914Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -119,6 +119,17 @@"fix"]},+ {+ "date": "2026-08-06",+ "type": "update",+ "title": "Every critical security advisory in the platform's open-source dependencies is cleared",+ "summary": "three.ws is built on several thousand open-source packages, and a review of them found three critical and 41 high-severity published advisories in what production actually ships. Most of them traced back to a single Solana library that four parts of the codebase listed as a requirement and none of them ever imported: removing it took an entire chain of outdated HTTP, form-parsing and file-upload libraries with it, including the two criticals. The third came from an old copy of a data-encoding library buried under the BNB Greenfield storage SDK, now collapsed onto the patched release. Everything else that had a compatible fix is pinned to it, and the image-processing library was moved up a version to pick up patched libvips. Production now carries zero critical advisories and 18 high, down from 41. What remains is the handful whose maintainers have not published a fix at all: those are named explicitly in the security audit so they can be re-checked rather than quietly forgotten. Two tools that several maintenance scripts had been relying on by accident are now declared properly, so those scripts keep working. Nothing about how the site looks or behaves changes here; this is about what runs underneath it.",+ "link": "/docs/security",+ "tags": [+ "security",+ "infra"+ ]+ },{"date": "2026-08-06","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 8e7da8837..070f33402 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -94,6 +94,14 @@<category>fix</category><description>Three things broke the on-chain deploy flow. Preparing a registration failed outright on any setup without IPFS pinning, which is the normal one. A bio longer than 280 characters was rejected even though agent bios allow 500. And deploying an agent you already had created a second, separate agent instead of putting the existing one on-chain. All three are fixed, a freshly deployed agent now appears in the public registry directory the moment its transaction confirms instead of waiting for the next crawl, and a deploy with no avatar attached is stopped with a link to add one rather than minting a body-less identity.</description></item>+ <item>+ <title>Every critical security advisory in the platform's open-source dependencies is cleared</title>+ <link>https://three.ws/docs/security</link>+ <guid isPermaLink="false">2026-08-06:Every critical security advisory in the platform's open-source dependencies is cleared</guid>+ <pubDate>Thu, 06 Aug 2026 12:00:00 GMT</pubDate>+ <category>security</category>+ <description>three.ws is built on several thousand open-source packages, and a review of them found three critical and 41 high-severity published advisories in what production actually ships. Most of them traced back to a single Solana library that four parts of the codebase listed as a requirement and none of them ever imported: removing it took an entire chain of outdated HTTP, form-parsing and file-upload libraries with it, including the two criticals. The third came from an old copy of a data-encoding library buried under the BNB Greenfield storage SDK, now collapsed onto the patched release. Everything else that had a compatible fix is pinned to it, and the image-processing library was moved up a version to pick up patched libvips. Production now carries zero critical advisories and 18 high, down from 41. What remains is the handful whose maintainers have not published a fix at all: those are named explicitly in the security audit so they can be re-checked rather than quietly forgotten. Two tools that several maintenance scripts had been relying on by accident are now declared properly, so those scripts keep working. Nothing about how the site looks or behaves changes here; this is about what runs underneath it.</description>+ </item><item><title>File uploads work again across speech, vision, and 3D endpoints</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex 5414cff52..da003bcd2 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-08-06T04:02:29.779Z",+ "generated_at": "2026-08-06T04:36:18.899Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",