Repository navigation
vuln: remove zod 3.25.76 (GHSA-mrhx-c7xc-m3w5) from trueforge #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@truefoundry/trueforge': patch | ||
| '@truefoundry/trueforge-ui': patch | ||
| --- | ||
|
|
||
| Security: drop transitive zod 3.25.76 (GHSA-mrhx-c7xc-m3w5, High) from the dependency tree. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,7 @@ overrides: | |
| resolve: '1.22.11' | ||
| # Rollup 4.63.0 OOMs the frontend Vite build (Monaco + compression plugin); stay on 4.62.x. | ||
| rollup: '4.62.2' | ||
| # GHSA-mrhx-c7xc-m3w5 (zod 3.x memory exhaustion, no fixed 3.x): force zod 4 for transitive deps | ||
| # that still pin zod@3 (@ag-ui/core via @openuidev/react-headless; @anthropic-ai/sandbox-runtime). | ||
| '@ag-ui/core>zod': '^4.6.7' | ||
| '@anthropic-ai/sandbox-runtime>zod': '^4.6.7' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing changeset for shipped packagesLow Severity This change alters runtime dependencies of published packages and the frontend bundle that ships in the server tarball, but adds no Additional Locations (1)Triggered by project rule: TrueForge review rules Reviewed by Cursor Bugbot for commit 90c71b5. Configure here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid. The repo's AGENTS.md requires a changeset when a PR changes the deps of published packages. I pushed 8fad3f4, which adds Scheduled vuln run (2026-11-16): today's devtest grype scan still shows 0 Critical / 1 High (zod 3.25.76, GHSA-mrhx-c7xc-m3w5) on trueforge, so this PR is still needed. @chiragjn's concern about the zod v4 override is still open and needs an owner decision. There is no fixed 3.x zod release. The alternatives are to accept the override (with the runtime checks described above) or to wait for upstream |
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing guarantees ag-ui or srt will work with zod v4, we should not override like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed — the override isn't something upstream supports. I looked for a safer fix and couldn't find a clean one, so I haven't changed any code yet. What I found:
Advisory: GHSA-mrhx-c7xc-m3w5 (High) affects
zod < 4.6.6, and the only patched version is4.6.6. The newest 3.x release is3.25.76, which is what we have, so there's no fixed 3.x to override to.@ag-ui/core(via@openuidev/react-headless)zod ^3.22.4and imports the rootzod(v3 API).@ag-ui/core@1.0.x(latest 1.0.4) supports zod v4 properly: peer range^3.25.18 || ^4.0.0, importszod/v4.@openuidev/react-headlessrelease up to the latest 0.18.8 pins@ag-ui/core ^0.0.53. So we can't get there with a normal version bump.EventType(a plain enum) from@ag-ui/core. Everything else it uses is type-only. Building the schemas when the module loads, and a quickEventSchemas.safeParsecheck (RUN_STARTED / TEXT_MESSAGE_CONTENT / ACTIVITY_SNAPSHOT), both work on zod 4.6.7.@anthropic-ai/sandbox-runtime(we pin 0.0.77)zod ^3.24.1and imports the rootzod.zod ^3.25.0but importzod/v3. zod 4.x still ships that path with the same v3 API.SandboxRuntimeConfigSchemaaccepts a valid config and rejects an invalid domain with the custom message. That's only a light check, not a guarantee.Options
@ag-ui/core@1.x, srt → zod v4. This advisory is about memory use when validating oversized arrays. We only use these schemas for srt config (which we control) and ag-ui event parsing, which react-headless doesn't call.zod/v3. Then runtests/sandbox/local/smoke.test.tsand the local sandboxhostRunpath on Linux and macOS before merging. For ag-ui, either accept the risk or keep its override, since onlyEventTypeis used at runtime.SandboxManager.initialize/wrapWithSandboxArgv, and the react-headless chat stream.My preference is (2) for srt and accept/document for ag-ui. Let me know which you'd like and I'll update the PR (it also needs a merge from main).