Skip to content

fix(deps): clear all 206 pnpm audit vulnerabilities (2 crit, 78 high,105 mod, 21 low)#577

Merged
i-subham23 merged 7 commits into
mainfrom
sd/openui-audit-fix
Jun 9, 2026
Merged

fix(deps): clear all 206 pnpm audit vulnerabilities (2 crit, 78 high,105 mod, 21 low)#577
i-subham23 merged 7 commits into
mainfrom
sd/openui-audit-fix

Conversation

@i-subham23

@i-subham23 i-subham23 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Resolves every advisory reported by pnpm audit (206 -> 0). Approach: fix at the proper source (workspace direct-dep bumps) wherever possible; use pnpm.overrides only for transitives whose parent SDK is already at its latest published version (i.e. truly upstream-stuck).

Direct-dep bumps (the bulk of fixes):

  • docs/: next 16.1.6->16.2.6, fumadocs-{core,mdx,ui} 16.6.5->16.9.1, posthog-js ^1.358->^1.376, openai ^6.22->^6.39, postcss ^8.5.6->^8.5.15; toc subpath import fix required by fumadocs-ui bump.
  • 11 Next.js example apps: next 16.1.6 -> 16.2.6 (+ matching eslint-config-next), openai -> ^6.39.0.
  • examples/openui-react-native/backend: next ^15.2.3 -> ^15.5.18.
  • examples/openui-react-native/chat-app: expo ~54.0.6 -> ~54.0.34.
  • examples/svelte-chat: vite -> ^6.4.2, @sveltejs/kit -> ^2.61.1, @sveltejs/vite-plugin-svelte -> ^5.1.1, svelte -> ^5.55.9, @ai-sdk/svelte 3.x -> ^4.0.191 (major), @ai-sdk/openai -> ^3.0.65, ai -> ^6.0.191.
  • examples/vue-chat: nuxt ^3.17 -> ^3.21.6, @ai-sdk/vue -> ^3.0.191, @ai-sdk/openai -> ^3.0.65, ai -> ^6.0.191.
  • examples/mastra-chat: @ag-ui/core ^0.0.45->^0.0.53, @ag-ui/mastra ^1.0.1->^1.0.2.
  • examples/{multi-agent-chat,vercel-ai-chat}: @ai-sdk/react ^3.0.118 ->^3.0.193, @ai-sdk/openai -> ^3.0.65, ai -> ^6.0.191 (fixes UIMessage type incompatibility from coexisting ai majors).
  • examples/openui-artifact-demo: react-syntax-highlighter ^15.6 ->^16.1.1.
  • examples/hands-on-table-chat: switched 4 @openuidev/* deps from published ^0.x versions to workspace:* (every other example uses workspace links; aligns this one); handsontable + react-wrapper 17.0.1 -> 17.1.0.
  • examples/supabase-chat: @supabase/ssr ^0.5->^0.10.3, @supabase/supabase-js ^2.49->^2.106.2 (clears ws CVE).
  • packages/react-ui: storybook + 11 @storybook/* addons ^8.5.3 ->^8.6.18; vite ^5->^6.4.2; webpack ^5.104.1 added as direct devDep (forces pnpm to hoist non-vulnerable webpack for @storybook/addon-styling-webpack peer); react-syntax-highlighter 15->^16.1.1 (fixes prismjs); lodash-es ^4.17.21->^4.18.1; @typescript-eslint/eslint-plugin ^8.56->^8.59.4; @types/node-fetch 2.6.11->2.6.13; form-data ^4.0->^4.0.5; postcss spec ^8.5.1->^8.5.15; tailwindcss ^3 -> ^3.4.19.
  • packages/svelte-lang: vite ^6->^6.4.2, vitest ^3->^3.2.4, svelte ^5->^5.55.9, @sveltejs/vite-plugin-svelte ^5->^5.1.1, jsdom ^26->^29.1.1.
  • packages/vue-lang: @vitejs/plugin-vue ^5->^6.0.7 (major), @vue/test-utils ^2.4->^2.4.10, vite ^6->^6.4.2, vitest ^3->^3.2.4, jsdom ^26->^29.1.1.
  • packages/{lang-core,react-lang}: vitest ^4.0.18->^4.1.7.
  • packages/browser-bundle: esbuild ^0.24->^0.25.12.
  • Root: @typescript-eslint/eslint-plugin ^8.56->^8.59.4; tsdown ^0.21.7->^0.22.0 (newer rolldown internals dropped a huge vulnerable transitive chain).

pnpm.overrides block (6 entries, each truly upstream-stuck):

  • langsmith@<0.6.0 deep inside @copilotkit/runtime via @ag-ui/mastra
    (latest). RSS deserialization fix.
  • ip-address@<10.1.1 via @modelcontextprotocol/sdk@1.29.0 (latest),
    @mastra/core@1.15.0 (latest), @ag-ui/mastra
    (latest). XSS in Address6 HTML emitters.
  • postcss@<8.5.10 bundled as postcss@8.4.31 inside next@16.2.6
    (latest stable; only 16.3 canaries exist).
    XSS via unescaped </style>.
  • qs@<6.15.2 via @mastra/core (latest), @ag-ui/mastra (latest).
    DoS via comma-format TypeError.
  • uuid@<11.1.1 via @ag-ui/mastra (latest), expo@~54.0.34
    (latest in major), @storybook/addon-essentials
    8.6.18 (latest 8.x; Storybook 8 is EOL).
    Buffer bounds check.
  • cookie@<0.7.0 via @sveltejs/kit@2.61.1 (latest), which pins
    cookie@^0.6.0. OOB chars in cookie name/path.

Each override is removable when the named upstream parent ships a patch.

Final audit: 0 critical / 0 high / 0 moderate / 0 low. pnpm install --frozen-lockfile passes (CI-mode install). All Next.js example builds verified. svelte-chat build verified after @ai-sdk/svelte major bump. vue-chat builds clean on CI Linux; fails locally on darwin-arm64 due to a pre-existing pnpm 9 + oxc-walker native-bindings bug (unrelated to this change — same failure on main).

What

Describe the change and why it is needed.

Changes

Test Plan

Describe how you validated this change.

  • Not applicable (explain why)
  • Verified locally

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility

… 105 mod, 21 low)

Resolves every advisory reported by `pnpm audit` (206 -> 0). Approach:
fix at the proper source (workspace direct-dep bumps) wherever possible;
use `pnpm.overrides` only for transitives whose parent SDK is already at
its latest published version (i.e. truly upstream-stuck).

Direct-dep bumps (the bulk of fixes):
- docs/: next 16.1.6->16.2.6, fumadocs-{core,mdx,ui} 16.6.5->16.9.1,
  posthog-js ^1.358->^1.376, openai ^6.22->^6.39, postcss ^8.5.6->^8.5.15;
  toc subpath import fix required by fumadocs-ui bump.
- 11 Next.js example apps: next 16.1.6 -> 16.2.6 (+ matching
  eslint-config-next), openai -> ^6.39.0.
- examples/openui-react-native/backend: next ^15.2.3 -> ^15.5.18.
- examples/openui-react-native/chat-app: expo ~54.0.6 -> ~54.0.34.
- examples/svelte-chat: vite -> ^6.4.2, @sveltejs/kit -> ^2.61.1,
  @sveltejs/vite-plugin-svelte -> ^5.1.1, svelte -> ^5.55.9,
  @ai-sdk/svelte 3.x -> ^4.0.191 (major), @ai-sdk/openai -> ^3.0.65,
  ai -> ^6.0.191.
- examples/vue-chat: nuxt ^3.17 -> ^3.21.6, @ai-sdk/vue -> ^3.0.191,
  @ai-sdk/openai -> ^3.0.65, ai -> ^6.0.191.
- examples/mastra-chat: @ag-ui/core ^0.0.45->^0.0.53, @ag-ui/mastra
  ^1.0.1->^1.0.2.
- examples/{multi-agent-chat,vercel-ai-chat}: @ai-sdk/react ^3.0.118
  ->^3.0.193, @ai-sdk/openai -> ^3.0.65, ai -> ^6.0.191 (fixes
  UIMessage type incompatibility from coexisting ai majors).
- examples/openui-artifact-demo: react-syntax-highlighter ^15.6
  ->^16.1.1.
- examples/hands-on-table-chat: switched 4 @openuidev/* deps from
  published ^0.x versions to workspace:* (every other example uses
  workspace links; aligns this one); handsontable + react-wrapper
  17.0.1 -> 17.1.0.
- examples/supabase-chat: @supabase/ssr ^0.5->^0.10.3,
  @supabase/supabase-js ^2.49->^2.106.2 (clears ws CVE).
- packages/react-ui: storybook + 11 @storybook/* addons ^8.5.3
  ->^8.6.18; vite ^5->^6.4.2; webpack ^5.104.1 added as direct devDep
  (forces pnpm to hoist non-vulnerable webpack for
  @storybook/addon-styling-webpack peer); react-syntax-highlighter
  15->^16.1.1 (fixes prismjs); lodash-es ^4.17.21->^4.18.1;
  @typescript-eslint/eslint-plugin ^8.56->^8.59.4; @types/node-fetch
  2.6.11->2.6.13; form-data ^4.0->^4.0.5; postcss spec ^8.5.1->^8.5.15;
  tailwindcss ^3 -> ^3.4.19.
- packages/svelte-lang: vite ^6->^6.4.2, vitest ^3->^3.2.4, svelte
  ^5->^5.55.9, @sveltejs/vite-plugin-svelte ^5->^5.1.1, jsdom
  ^26->^29.1.1.
- packages/vue-lang: @vitejs/plugin-vue ^5->^6.0.7 (major),
  @vue/test-utils ^2.4->^2.4.10, vite ^6->^6.4.2, vitest ^3->^3.2.4,
  jsdom ^26->^29.1.1.
- packages/{lang-core,react-lang}: vitest ^4.0.18->^4.1.7.
- packages/browser-bundle: esbuild ^0.24->^0.25.12.
- Root: @typescript-eslint/eslint-plugin ^8.56->^8.59.4; tsdown
  ^0.21.7->^0.22.0 (newer rolldown internals dropped a huge vulnerable
  transitive chain).

`pnpm.overrides` block (6 entries, each truly upstream-stuck):
- langsmith@<0.6.0    deep inside @copilotkit/runtime via @ag-ui/mastra
                      (latest). RSS deserialization fix.
- ip-address@<10.1.1  via @modelcontextprotocol/sdk@1.29.0 (latest),
                      @mastra/core@1.15.0 (latest), @ag-ui/mastra
                      (latest). XSS in Address6 HTML emitters.
- postcss@<8.5.10     bundled as postcss@8.4.31 inside next@16.2.6
                      (latest stable; only 16.3 canaries exist).
                      XSS via unescaped </style>.
- qs@<6.15.2          via @mastra/core (latest), @ag-ui/mastra (latest).
                      DoS via comma-format TypeError.
- uuid@<11.1.1        via @ag-ui/mastra (latest), expo@~54.0.34
                      (latest in major), @storybook/addon-essentials
                      8.6.18 (latest 8.x; Storybook 8 is EOL).
                      Buffer bounds check.
- cookie@<0.7.0       via @sveltejs/kit@2.61.1 (latest), which pins
                      cookie@^0.6.0. OOB chars in cookie name/path.

Each override is removable when the named upstream parent ships a
patch.

Final audit: 0 critical / 0 high / 0 moderate / 0 low.
`pnpm install --frozen-lockfile` passes (CI-mode install). All
Next.js example builds verified. svelte-chat build verified after
@ai-sdk/svelte major bump. vue-chat builds clean on CI Linux; fails
locally on darwin-arm64 due to a pre-existing pnpm 9 + oxc-walker
native-bindings bug (unrelated to this change — same failure on main).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ck.yaml to resolve compatibility issues and vulnerabilities
@ankit-thesys ankit-thesys self-assigned this Jun 8, 2026
i-subham23 and others added 4 commits June 8, 2026 18:39
Resolve conflicts by adopting main's pnpm catalog (#612):
- svelte-lang / vue-lang: take "jsdom": "catalog:" (^26.1.0)
- regenerate pnpm-lock.yaml combining the catalog with the audit-fix
  dependency bumps (vitest ^4.1, next 16.2.7, prismjs >=1.30.0,
  @ai-sdk/provider-utils override ^4.0.27)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve pnpm-lock.yaml conflict: regenerate with pnpm 9.15.9 so the
lockfile reflects main's pnpm catalog (#612) together with the audit-fix
dependency bumps (vitest ^4.1, next 16.2.7, prismjs >=1.30.0,
@ai-sdk/provider-utils override ^4.0.27). Validated with
`pnpm install --frozen-lockfile`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve conflicts preserving audit-fix dependency bumps alongside main's changes:
- browser-bundle: keep esbuild ^0.25.12 (CVE fix) + main's rimraf ^5.0.7 (build needs it)
- react-ui: keep vite ^6.4.2 + webpack ^5.104.1 (CVE fixes) + main's rimraf ^5.0.7
- pnpm-lock.yaml: regenerate (pnpm 9.15.9) combining main's catalog with the
  audit fixes (vitest ^4.1, next 16.2.7, prismjs >=1.30.0, @ai-sdk/provider-utils ^4.0.27)

Verified: pnpm audit clean, react-headless 70/70 tests pass on vitest 4.1.7,
react-ui + browser-bundle build successfully.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@ankit-thesys ankit-thesys left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified pnpm audit, and it looks Good
All the functionality is checked along with examples
pr description is stale

@i-subham23 i-subham23 merged commit e6b876b into main Jun 9, 2026
1 check passed
@i-subham23 i-subham23 deleted the sd/openui-audit-fix branch June 9, 2026 10:34
ankit-thesys added a commit that referenced this pull request Jun 10, 2026
….0.8

Version bumps for the first publish since 2026-05-20 (4b663b9):

- @openuidev/react-ui 0.11.8 -> 0.12.0 (minor): component CSS now ships
  in `@layer openui` (#589/#621) and react-syntax-highlighter moved to
  ^16.1.1 (#577, fixes prismjs CVE-2024-53382)
- @openuidev/lang-core 0.2.5 -> 0.2.6 (patch): parser preserves markdown
  fences and comments inside string props (#605)
- @openuidev/cli 0.0.7 -> 0.0.8 (patch): cross-platform template build
  (#601, #627); no functional changes to the published CLI

Remaining packages have no consumer-visible changes since the last
publish and are not republished; the lang wrappers pick up lang-core
0.2.6 transitively via their ^0.2.5 ranges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ankit-thesys added a commit that referenced this pull request Jun 16, 2026
* chore(release): bump react-ui to 0.12.0, lang-core to 0.2.6, cli to 0.0.8

Version bumps for the first publish since 2026-05-20 (4b663b9):

- @openuidev/react-ui 0.11.8 -> 0.12.0 (minor): component CSS now ships
  in `@layer openui` (#589/#621) and react-syntax-highlighter moved to
  ^16.1.1 (#577, fixes prismjs CVE-2024-53382)
- @openuidev/lang-core 0.2.5 -> 0.2.6 (patch): parser preserves markdown
  fences and comments inside string props (#605)
- @openuidev/cli 0.0.7 -> 0.0.8 (patch): cross-platform template build
  (#601, #627); no functional changes to the published CLI

Remaining packages have no consumer-visible changes since the last
publish and are not republished; the lang wrappers pick up lang-core
0.2.6 transitively via their ^0.2.5 ranges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(react-ui): strip leading BOM before wrapping CSS in @layer openui

Sass emits a UTF-8 BOM for compressed output containing non-ASCII
characters. At byte 0 the CSS decoder strips it, but wrapInLayer()
concatenated the layer prelude in front of it, pushing the BOM inside
the block where U+FEFF parses as an identifier: `:root` becomes a
type selector that matches nothing, silently killing the first rule.

In the packed 0.12.0 tarball this dropped the entire :root theme-token
block of dist/components/index.css (and the first rule of
dist/styles/index.css and markDownRenderer.css). Verified in Chrome:
the BOM-poisoned rule does not apply; subsequent rules are unaffected.

Strip the BOM before wrapping. Repacked tarball now has 0 BOMs across
all 171 shipped CSS files and the :root block parses correctly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(react-ui): strip leading BOM from unlayered default CSS

The opt-in re-land (#631) only strips the BOM when wrapping the layered
mirror, so Sass's compressed-mode BOM leaked into the unlayered defaults
(components.css, styles/index.css, markDownRenderer.css). A leading BOM is
harmless to browsers but breaks the package's zero-BOM contract and would
become fatal if those files were ever wrapped. cp-css.js now strips it from
the unlayered output, and check-css-artifacts.js asserts the unlayered
exports are BOM-free too (the guard previously only checked the layered mirror).

Root cause is on main (#631's cp-css.js) — flagged for a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants