0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

2,063 commits

Author SHA1 Message Date
shreyas-mastra
8d4abc4f88
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
Dane - AI (Mastra)
c22107fce3
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.45 (#29844) 2026-11-10 20:07:34 -08:00
shreyas-mastra
8a301f6d66
chore(deps): force minimatch 11 and glob 14 for Vanta findings (#29916) 2026-11-10 12:57:20 -08:00
shreyas-mastra
94e5e0dbf2
chore(deps): security refresh for templates, examples and integration tests (Vanta) (#29453)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Dependency updates

Refs SEC-256, SEC-261, SEC-262, SEC-263

**2026-11-09:** merged `origin/main` into this branch with a merge
commit (no rebase, no force-push). `main` already raised `better-auth`
to `^1.7.18` (with its own changeset), so this branch now takes main's
version and floors. The old 1.7.16 changeset is removed, and no
`better-auth` change is left in this PR.

| Package | Where | From → To | Advisory |
|---|---|---|---|
| chat | `template-genui-data-explorer`,
`template-customer-refund-agent` lockfiles (via `@mastra/core`) | 4.41.1
/ 4.39.0 → 4.44.0 | AIKIDO-2026-571219 (2026-11-09) |
| `@hono/node-server` | `template-customer-refund-agent/client-demo-ui`
direct pin | 2.1.5 → 2.1.6 (matches the template's existing 2.1.6
override) | GHSA-jpvv-r467-5p4w and related (2026-11-09) |
| next | GenUI template, memory integration tests | 16.4.2/16.4.4 →
16.4.5 | Next.js advisories through 16.4.4 |
| fastify | otel-bridge agent-hub | 5.12.6 → 5.12.8 | AIKIDO through
5.12.7 |
| shell-quote / proxy-addr / image-size / `@hono/node-server` | MongoDB
Bedrock template lockfiles | refreshed (1.12.0 / 2.0.8 / 2.0.4 / 2.1.6)
| CVE-2026-102422, CVE-2026-90711, CVE-2025-71329/71330, CVE-2026-118663
|
| @opentelemetry/auto-instrumentations-node | MongoDB Bedrock template |
^0.60.0 → ^0.75.0 | CVE-2026-44902 |

Empty changeset (`vanta-2026-11-09-template-chat-4-44.md`), because this
PR now changes only templates, examples, and integration tests. No
published package changes. All versions used were published more than a
day ago. No overrides were removed or lowered.

Deferred (major-only or no fixed release): extract-zip@2.0.1 (no fix),
deepmerge 4.3.1 (no fix), picomatch 4.0.7 (no fix), zod 3.25.76 (fix in
4.x), `@ai-sdk/provider-utils` 2.2.8/3.0.x (fix in 4.0.20+, AI SDK v4/v5
compat lines), ai 4.3.19/5.0.210 (fix in 5.0.52 / 6.0.170),
`@azure/msal-node@5.6.0` (7.1.0), minimatch 9/10 (11.0.1), glob
10.5.0/13.0.6 (14.0.2; 13.0.7 is not listed as patched), openai 6.49.0
(7.5.0), `@bufbuild/protobuf@1.10.1` (2.12.1), got 15.1.0 (16.0.0),
`@apidevtools/json-schema-ref-parser@11.9.3` (15.5.1), undici 6.29.1
(7.30.1), nanoid 3.3.20 (5.1.16).
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-e7dae54a-e16d-5b3a-ae5d-99ce740a451f?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-e7dae54a-e16d-5b3a-ae5d-99ce740a451f&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR updates several third-party packages to newer versions. The
updates include authentication fixes and security-related dependency
updates.

## Changes

- Updated `better-auth` to `1.7.16` in the workspace, authentication
package, and agent example. Added a patch changeset for
`@mastra/auth-better-auth` describing session and verification fixes.
- Updated `next` to `16.4.5` in the memory integration tests and GenUI
data explorer template.
- Updated `fastify` to `5.12.8` in the OpenTelemetry bridge example.
- Updated OpenTelemetry instrumentation and `zod` in the MongoDB Bedrock
agent template. Added scoped `@ai-sdk/provider-utils` overrides and a
`compression` override.
- Updated the related pnpm and npm lockfiles.

## Validation

Build and test results: not available.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: shreyas-mastra <shreyas-mastra@users.noreply.github.com>
2026-11-09 11:54:58 -05:00
Dane - AI (Mastra)
4bd4b7f48e
chore(deps): update better-auth monorepo to v1.7.18 (#29714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-09 12:39:24 +01:00
Marvin Frachet
21b6078016
feat(mcp-apps-components): draw a whole observability dashboard (#29645)
The observability MCP app used to draw a single widget picked from a few
hard-coded ones, which made it pretty limited on real data. It now draws
a whole dashboard (rows of KPIs, time series, tables and scores), using
the dashboard's default date preset and filters. Each widget loads and
fails on its own.

The model doesn't write the stored dashboard format directly. It writes
a simpler shape where each widget, read and column type is a key, and
each number holds the read it comes from, so nothing points at a query,
series or column by id and a dashboard can't reference something it
lacks. `toObservabilityDashboard` gathers the reads into shared queries,
fills in series keys, totals and default sort, assigns missing widget
ids, and checks the result against `dashboardDefinitionSchema`. A widget
without a `span` fills the row.

```ts
{
  span: 6,
  timeseries: {
    chart: 'stackedBar',
    format: 'count',
    series: [
      {
        label: 'Runs',
        color: 'green',
        value: { metricTimeSeries: { name: ['mastra_agent_duration_ms'], aggregation: 'count' } },
      },
    ],
  },
}
```

The schema names the metrics Mastra records so the model doesn't guess
names that read as zero. `createObservabilityDashboardInputSchema({
metricNames })` narrows them to the project's own metrics. The example
server refreshes that list before each run and also exposes a discovery
tool for label keys and values.

```ts
import {
  observabilityDashboardInputSchema,
  observabilityDashboardOutputSchema,
  toObservabilityDashboard,
} from '@mastra/mcp-apps-components';

createTool({
  id: 'showObservabilityDashboard',
  inputSchema: observabilityDashboardInputSchema,
  outputSchema: observabilityDashboardOutputSchema,
  execute: async input => toObservabilityDashboard(input),
});
```

Every widget on Studio's metrics dashboard round-trips through the new
shape. On three prompts, gpt-5.5 and gpt-5-mini render every dashboard.
gpt-5.4-mini still struggles with tables.

`@mastra/core` and `zod` are now peer dependencies. To test, run `pnpm
--filter @mastra/mcp-apps-components test`, or run `examples/agent` and
ask the observability agent for a dashboard in Studio.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR changes the observability app from showing one widget to showing
a full dashboard. Each widget can load or show an error on its own, so
one failing widget does not block the others.

## Summary

- Add schemas for model-authored dashboards with KPI, time-series,
table, and score widgets. Convert validated input into a stored
dashboard, sharing matching reads and filling in missing widget IDs and
spans.
- Update the app to render dashboard rows and apply the dashboard’s date
preset and default filters. Show widget-level errors independently.
- Add an example dashboard tool and observability discovery tool.
Support metric-name validation against a project’s catalog.
- Update documentation, exports, pin context, and peer dependencies.
Rename the app resource to `observabilityDashboardApp`.
- Add tests for dashboard schemas, conversion, rendering, widget
failures, date ranges, filters, and pinning.

**Diff:** 18 files changed; 1,938 lines added and 304 removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-07 09:33:22 -08:00
Marvin Frachet
d95e580fad
feat(mcp-apps-components): add an observability widget MCP app (#29557)
Adds `observabilityWidgetApp`, an MCP app that draws one observability
dashboard widget (KPIs, time series…) right in the conversation. It
renders with playground-ui's `StatelessWidget`, so the chart looks and
behaves like the one on the Metrics dashboard.

The app runs sandboxed in the host's iframe and can't reach the Mastra
server, so it reads its data through an app-only `queryObservability`
tool taking `{ action, args }`, where `action` is a `MastraClient`
observability method. That tool lives in the server registering the app,
not in the package, so each deployment chooses its own endpoint and
credentials (local server or a hosted platform):

```ts
import { observabilityWidgetApp, QUERY_OBSERVABILITY_TOOL } from '@mastra/mcp-apps-components';

new MCPServer({
  id: 'observability-mcp-server',
  appResources: { 'ui://mastra/observability-widget': observabilityWidgetApp },
  tools: {
    showObservabilityWidget, // model-visible, returns { widget, datePreset }
    [QUERY_OBSERVABILITY_TOOL]: queryObservability, // app-only, returns { data }
  },
});
```

The app follows the host's light/dark theme. playground-ui exports
`emptyAnswer` so hosts can skip requests whose filters can never match
without calling the server. `examples/agent` gets a full reference
setup: an observability MCP server with preset widgets (overview,
agentRuns, tokenUsage, latency), a read-only `queryObservability` tool
and an observability agent.

Test plan: jsdom tests drive the app through a real MCP server and
`AppBridge`. They cover rendering the server's answer over the preset
window, a failed read, an invalid widget and the light theme. Another
test checks that the built resource is one self-contained HTML page. I
also checked it end to end in Studio against `examples/agent`: the agent
picks the right widget for the question, the chart shows live data and
the tool rejects unknown actions.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR lets a chat show one observability dashboard widget and fetch
its data through a tool provided by the host. Hosts can also let users
pin and unpin widgets, while keeping control of which widgets stay
pinned.

## Summary

- Adds `observabilityWidgetApp`, which renders a dashboard widget in a
sandboxed iframe. The app reads metrics through the server’s app-only
`queryObservability` tool and follows the host theme.
- Adds host integration for widget pinning. `observabilityWidgetPins`
provides pinned IDs to the matching app and forwards valid pin and unpin
updates to host callbacks.
- Extends `McpAppViewer` and the chat tool result flow to pass host
context and receive structured model-context updates.
- Exports `emptyAnswer` from playground-ui’s dashboard domain so callers
can represent requests that need no data.
- Adds an `examples/agent` setup with an observability MCP server, read
tool, agent, and preset widgets.
- Adds tests and documentation for widget rendering, data reads, host
context, and pinning.

**Change size:** 35 files changed; 1,501 lines added and 12 removed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-05 10:12:02 -08:00
Marvin Frachet
9356f211f3
refactor(mcp-apps-components): restart on the MCP Apps spec with a greeting app (#29510)
`@mastra/mcp-apps-components` had grown its own layer on top of the [MCP
Apps spec](https://github.com/modelcontextprotocol/ext-apps). The
dashboard app read its data through a generic tool that ran the
observability routes in-process, which required a Mastra instance and
`@mastra/server`. Widget pinning depended on custom host-context keys,
which only Studio understood, wired in through an `McpAppHostProvider`
in `@mastra/playground-ui`. Every new app would have had to learn this
layer, and none of it is part of the spec.

This PR restarts the package on the spec alone, with a small app that
uses every path an app needs:

- **`greetingApp`** (package root) is a React app built into one
self-contained HTML page. It reads its tool's arguments from
`ui/notifications/tool-input` and gets its data by calling an app-only
server tool (`visibility: ['app']`) with `callServerTool`. A button
posts a reply to the conversation with `ui/message`. That's everything
it does.
- **The host writes both tools as regular Mastra tools**: the one the
model calls to open the app, and the app-only one that returns the data.
Data access and auth stay on the server, so the iframe needs no network
access and can't see a token. The package has no peer dependencies
anymore.
- **Removed:** the dashboard app (`./dashboard-renderer`,
`./observability-tools`), widget pinning, the `./host` entry, and
`McpAppHostProvider` together with the `onModelContext` and
`hostContext` props of `McpAppViewer`. MCP Apps in Studio work as they
did before the provider was added.
- `examples/agent` replaces the dashboard agent with a greeting agent.
Its `getGreeting` tool calls a real remote API on the server side. The
README, the MCP docs page and the changeset are updated.

Before:

```ts
import { dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools';

new MCPServer({
  appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
  tools: { showDashboard, ...observabilityAppTools },
});
```

After:

```ts
import { greetingApp } from '@mastra/mcp-apps-components';

new MCPServer({
  appResources: { 'ui://mastra/greeting': greetingApp },
  tools: { showGreeting, getGreeting }, // getGreeting: mcp._meta.ui.visibility = ['app']
});
```

The package is still in alpha, so the dashboard changesets that were
never released are dropped instead of being reverted.

## Test plan

- `@mastra/mcp-apps-components`: build, typecheck, lint, tests.
- A real `MCPServer` serves the built page over Streamable HTTP. The
test checks that the page is a single self-contained document.
- The app is rendered against a real `AppBridge` relaying to that
server. The tests check that the app greets the name from the tool input
with the server's answer, posts the reply message, and shows the tool's
error.
- `@mastra/playground-ui`: typecheck and the `mcps`/`chat` tests (699
passing).
- Manual check in Studio (`examples/agent`): "Greet Ada" opens the app,
the app shows the greeting it got from `getGreeting`, and **Say hi
back** posts "Ada says hi back!" to the chat, which the agent answers.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5
This PR replaces the package’s dashboard app with a small greeting app.
The app gets a name, asks the server for a greeting, and lets the user
send a reply.

## Summary
- Export `greetingApp` and `McpAppResource` from the package root. The
app reads the opening tool’s input, calls an app-only server tool, and
can send a message to the conversation.
- Remove the dashboard renderer, its data and pinning tools, the host
entry point, and the package’s custom app runtime. The package now has a
single root export and no peer dependencies.
- Replace the example dashboard agent and server with a greeting agent
and MCP server. Update the README, MCP documentation, and changesets.
- Remove Playground’s MCP App host provider and the `hostContext` and
`onModelContext` viewer props. The viewer still supports model-context
updates through `onUpdateModelContext`.

## Validation
The supplied PR objectives report package build, typecheck, lint, and
test checks, plus Playground typecheck and `mcps`/`chat` tests with 699
passing. They also report a manual Studio check. These results are not
independently verified here. Current-head check results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-05 06:39:24 -08:00
Dane - AI (Mastra)
bfe3af4ae1
chore(deps): update better-auth monorepo to v1.7.15 (#29497) 2026-11-04 17:36:58 -08:00
Marvin Frachet
4bb378b97b
feat(mcp-apps-components): ship one dashboard data tool with the app (#29491)
The dashboard MCP App used to need 11 route-specific tools
(`observabilityAppTools`) registered next to it, and their route list
was defined in the UI package. If you forgot them, the iframe loaded and
every widget failed with a generic error after a few retries.

This replaces them with a single app-only tool, `dashboardDataTool`,
which ships from the same entry point as the app:

```ts
import { dashboardDataTool, dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';

new MCPServer({
  // ...
  appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
  tools: { showDashboard, dashboardDataTool },
});
```

Inside the iframe, each `MastraClient` read (for example
`getMetricAggregate`) becomes a call to that tool with a named
operation. The tool only answers the operations in
`DASHBOARD_DATA_OPERATIONS`, and it runs the matching observability
route in-process with `invokeRoute()` as the signed-in caller, so the
route's own validation, auth, RBAC and FGA checks still apply. Hosts
that want to answer reads themselves can use the exported contract
(`DASHBOARD_DATA_TOOL_NAME`, `DASHBOARD_DATA_OPERATIONS`,
`DASHBOARD_DATA_REQUESTS`, and the input and output schemas).

Widget errors are clearer now too. A missing tool answers 404 with how
to register it, and tool errors answer 400 with the route's message
instead of a serialized `MastraError`. `MastraClient` no longer retries
either one.

The `/observability-tools` entry point is removed, which breaks
compatibility for the alpha (the minor changeset shows the
before/after). This replaces #29449. #29456 will need a rebase onto
this, since `observability-fetch.ts` is gone.

Tested with the package's typecheck, lint and build, and 42 tests,
including integration tests that run a real Mastra server with auth/RBAC
over MCP HTTP, through `AppBridge` and `MastraClient` (allowed read,
403, missing tool, validation errors, no retries).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

The dashboard needs data to show charts and scores. This change gives it
one tool to request that data, while the server applies its existing
checks.

## Summary

- Replaces 11 observability tools with `dashboardDataTool`, which hosts
register alongside `dashboardRendererApp`.
- Defines 11 supported operations and exports the tool name, operation
list, request map, and input and output schemas from
`@mastra/mcp-apps-components/dashboard-renderer`.
- Runs supported requests through `invokeRoute()` with the caller’s
request context, so route validation and access checks apply. The tool
is visible to the app, not the model.
- Adds a fetch adapter that sends dashboard reads through the host’s MCP
connection. It identifies missing tools by JSON-RPC invalid-params code
`-32602`, returns registration guidance, and maps tool errors to HTTP
responses.
- Updates Studio to return JSON-RPC invalid-params errors for
unavailable or model-only tools.
- Removes the `@mastra/mcp-apps-components/observability-tools` package
entry point, breaking alpha compatibility.

## Validation

The PR objectives report that package typecheck, lint, build, and 42
tests passed. These results were not independently verified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 16:49:37 -08:00
Marvin Frachet
d09fc6d279
fix(examples): point the dashboard agent at the port mastra dev bound (#29446)
The dashboard agent in `examples/agent` connects to its own MCP server
over HTTP, but the URL was hardcoded to `localhost:4111`. If something
else already holds 4111 (another example, another worktree), `mastra
dev` moves to 4112+, the client hits the wrong server and gets a 404,
and the agent ends up with no `showObservabilityDashboard` tool, so
Studio never renders the dashboard MCP app.

Before:

```ts
const MASTRA_SERVER_URL = process.env.MASTRA_BASE_URL ?? 'http://localhost:4111';
```

After (`mastra dev` passes the port it bound as `PORT`):

```ts
const MASTRA_SERVER_URL = process.env.MASTRA_BASE_URL ?? `http://localhost:${process.env.PORT ?? 4111}`;
```

Tested by running `pnpm mastra dev` while 4111 was taken. The server
fell back to 4112, the agent picked up the dashboard tool, and the chart
rendered in Studio chat.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

The dashboard agent needs to connect to the same server that `mastra
dev` starts. It now uses the server’s selected port, so the agent can
find the dashboard tool even when port 4111 is already in use.

## Changes

- `MASTRA_SERVER_URL` uses `MASTRA_BASE_URL` when set.
- Otherwise, it uses `PORT`, with port 4111 as the fallback.
- Updated the comment to explain that `mastra dev` passes its selected
port through `PORT`.

## Testing

The supplied context reports a manual check with port 4111 occupied. No
automated tests were added.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 13:03:24 -08:00
Marvin Frachet
944d4bcb13
feat(mcp-apps-components): add prebuilt MCP Apps with a dashboard renderer (#29321)
This adds `@mastra/mcp-apps-components`, a package of prebuilt MCP Apps
you can serve from any `MCPServer`, plus the server and client changes
they need to read data safely as the signed-in user. Each app has its
own entry point (no root barrel). The first one is a dashboard renderer:
a tool returns a dashboard definition and the host renders it as live
observability charts.

```ts
import { MCPServer } from '@mastra/mcp';
import { dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools';

new MCPServer({
  id: 'dashboard-mcp-server',
  name: 'Dashboard MCP Server',
  version: '1.0.0',
  appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
  tools: { showObservabilityDashboard, ...observabilityAppTools },
});
```

## How it works

**The app.** A single self-contained HTML page, inlined into the
package's JS so it survives deployer bundling (Vercel, Netlify,
Cloudflare) with no file reads at runtime. Its iframe never reaches the
network: it reads data with `callServerTool` over the host's existing
MCP connection, so no CSP or `baseUrl` setup is needed. It follows the
host's light/dark theme. Drilldowns continue the conversation when the
host supports `ui/message`; on hosts that also support
`ui/update-model-context`, the app passes the exact filters as
structured context and posts a short prompt, otherwise it spells the
filters out in the message.

**Typed observability tools.** `observabilityAppTools` is 11 app-only
tools, one per read-only observability route the dashboard uses
(trace/span/metric/score aggregates, breakdowns, time series,
percentiles, and score listing). Each takes the route's own input schema
and runs the route in-process through the new `invokeRoute()`.

**`invokeRoute()` (`@mastra/server/server-adapter`).** Runs a JSON
server route in-process as the caller, with the same validation, RBAC
permission and FGA checks its HTTP endpoint applies on every adapter,
and returns `{ status, body }`. It does not re-authenticate: when auth
is configured, the request context must carry the user Mastra server
auth resolved, or the call gets a 401. Non-JSON routes throw, and
HTTP-only handler params (`request`, `registeredTools`, `taskStore`,
`routePrefix`) are not supplied.

**Caller identity in MCP tools.** MCP tools served over HTTP now see the
caller Mastra server auth resolved (user, permissions, roles, resource,
organization) in their `requestContext`, on Hono, Express, Fastify, Koa,
Elysia and NestJS. The server attaches it to the MCP request under a
symbol key, so it can only come from the server, never from
client-supplied auth claims.

**Hiding app-only tools.** `MCPClient.listTools()`/`listToolsets()` hide
tools marked `_meta.ui.visibility: ['app']` from agents.

**Studio host.** Studio advertises the host capabilities it handles
(tool calls, messages, model context), passes its theme, routes app tool
calls to the requested tool in the MCP tool playground, and refuses app
calls to model-only tools. App model context is added to the next user
message only, as a clearly delimited block of untrusted app data, never
as system instructions.

## Try it

`examples/agent` has a `dashboard-agent`. In Studio, try "Show me agent
runs over the last 7 days as a line chart".

## Docs

- New reference page for `invokeRoute()`.
- New "Use prebuilt Mastra apps" section in the MCP connections guide.

## Testing

- `invokeRoute` unit tests (auth, permission, validation, handler
errors, non-JSON routes).
- Shared MCP transport suite case, run on every adapter, checking tools
see the server-resolved user and permissions and unauthenticated calls
get 401.
- `observability-tools` tests through a real Hono server with auth and
RBAC: MCP calls, Studio relay, permission denial, invalid input, and a
bundled-consumer test for the inlined HTML.
- Playground and playground-ui tests for the app viewer and model
context handling.
- Manual Studio run: dashboard renders live data and drilldown sends the
context block with the next message.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR adds ready-made MCP apps, including a dashboard that shows
observability data. It also lets Studio display these apps and pass
their context to chat as untrusted user content.

## What changed

- Added `@mastra/mcp-apps-components` with a dashboard renderer and
app-only observability tools. The tools invoke server routes in-process
and use the routes’ validation and authorization checks.
- Added `invokeRoute()` for in-process execution of eligible JSON
routes.
- Updated MCP server adapters to pass trusted, server-resolved caller
identity to MCP tools. MCP client discovery filters app-only tools from
agent-facing listings.
- Updated Studio and the playground to render MCP apps, relay app tool
calls, provide host capabilities, restrict tool calls and links, and
attach app context to the next chat message.
- Added a dashboard agent example and documentation for MCP Apps and
`invokeRoute()`.

## Validation

The author reports tests for route invocation, observability tools, MCP
transports across all six adapters, and playground app and chat
behavior. The author also reports a manual Studio check. These results
were not independently verified.

The author reports that the npm reservation for
`@mastra/mcp-apps-components` remained open and required an npm
organization admin before merge.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 10:41:58 -08:00
shreyas-mastra
f0ad164646
chore(security): Vanta 2026-11-02 - @hono/node-server 2.1.6 (MCP SDK/templates), graphql-scalars 2.0.1, raw-body 4, jose 6 (overrides) (#29199) 2026-11-04 07:58:48 -08:00
Dane - AI (Mastra)
9ce7e350ea
chore(deps): lock file maintenance (#29341)
Co-authored-by: wardpeet <ward@coding-tech.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 15:03:55 +01:00
Ehindero Israel
c7d27f650b
feat(editor): make model fallback lists editable and persistent (#27287)
Adds opt-in Editor ownership for static model fallback lists on
code-defined agents.

```ts
new Agent({
  id: 'support-agent',
  model: [
    { id: 'primary', model: 'openai/gpt-5.4-mini' },
    { id: 'fallback', model: 'anthropic/claude-sonnet-4-5' },
  ],
  editor: { model: true },
})
```

Studio can reorder models, change provider/model selections, and enable
or disable entries. These changes follow the configured Editor
persistence workflow:

- Database-backed Editor storage creates versioned drafts that can be
published.
- Code-backed Editor storage saves overrides to the filesystem or
through the configured pull-request workflow.

Persisted entries include their order, provider, model ID, enabled
state, and `maxRetries`. Immutable model IDs reconnect stored values to
code-defined entries while preserving non-serializable code
configuration.

Function-valued model configurations remain code-owned and read-only in
Studio.

This also adds storage support, model-list persistence through the
existing server mutation routes, generated client types, regression
coverage, documentation, and a changeset.

Closes #27089.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This lets teams edit and save an agent’s model fallback list in Studio
without changing code. The feature is opt-in, so existing agents keep
their current behavior by default.

## Summary

- Added `editor: { model: true }` support for code-defined agents.
- Added persistent `modelList` storage with entry IDs, provider, model
ID, enabled state, and `maxRetries`.
- Applied stored overrides by matching immutable entry IDs while
preserving code-owned configuration.
- Persisted reorder and update actions through Editor drafts and
publishing workflows.
- Added filesystem, LibSQL, server route, export, versioning, and client
cache support.
- Kept function-valued model configurations code-owned and read-only in
Studio.
- Updated ownership logic, API schemas, client behavior, and
documentation.
- Added regression coverage for runtime overrides, persistence, exports,
ownership, draft activation, storage compatibility, and query
invalidation.
- Added changesets for the affected packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-02 18:53:39 +01:00
Dane - AI (Mastra)
a69d91af24
chore(deps): update security updates [security] (#28883) 2026-10-31 11:41:36 -07:00
shreyas-mastra
655b19993f
chore(security): Vanta 2026-10-30 - zod ^4.6.7, @hono/node-server 2.1.5 (direct bumps) (#28983)
## Vanta 2026-10-30 security fixes (consolidated)

Direct dependency bumps and lockfile updates only. **No
overrides/resolutions added or raised.** The earlier override-based
edits on this branch were reverted; those findings are deferred below.

| Package | From → To | Advisory | Where |
|---|---|---|---|
| zod | ^3.25.76 → ^4.6.7 | zod <4.6.6 (High; no fixed 3.x) |
`client-sdks/react` (dev), `deployers/cloudflare` (dev),
`server-adapters/nestjs` (dev), `packages/editor` (dev),
`packages/playground-ui` (dep), `packages/playground`,
`workflows/_test-utils`, `examples/{durable-agents,inngest}`,
`explorations/longmemeval`,
`observability/_examples/otel-bridge/agent-hub`, e2e fixtures/templates
(`experiment-worker/fixtures/*`, `deployers/template/cloudflare`,
`no-bundling/template`, agent-builder `minimal-mastra-project`) + root
`pnpm-lock.yaml` |
| @hono/node-server | 1.19.x / 2.1.1 → 2.1.5 | CVE-2026-118663 /
GHSA-rmxm-3fg6-px4f (Medium) | direct deps: `examples/agent-builder`,
`otel-bridge/hono-multi/service-{one,two,mastra}`,
`templates/template-customer-refund-agent/client-demo-ui`,
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage` |

Peer ranges (`^3.25.0 || ^4.0.0`) are unchanged, so consumers are
unaffected. Changeset: patch for `@mastra/playground-ui` (runtime zod
dep).

Supersedes the zod parts of #28075 (that PR also raises a pnpm override
and rewrites the `zod-v3` compat aliases to v4, so it is left as-is for
maintainers).

### Deferred (needs override, upstream release, or is intentional)
- zod v3 compat aliases (`zod-v3` in `packages/core`,
`packages/schema-compat`, `e2e-tests/type-check/template`;
`e2e-tests/client-js/zod-v3`): intentional zod 3 test coverage; no fixed
3.x release. Needs a decision to drop/dismiss.
- zod 3.25.76 transitive via `@arcadeai/arcadejs`, `@mcp-ui/client`,
firecrawl, `agent-browser`, `zod-to-json-schema`, MCP SDK paths:
upstream pins; override-only.
- @hono/node-server 1.19.x transitive via `@modelcontextprotocol/sdk`
(root, `examples/agent`, `packages/mcp/integration-tests`), and npm
lockfiles of `scripts/gh-issue-triage` (existing override, left alone)
and the two templates: override-only.
- graphql-scalars, raw-body, jose (templates/scripts): override-only.
- @azure/msal-node <7.1.0: 6.0.1 via `@azure/identity@4.14.0` (fixed in
4.14.1, blocked by the 1-day `minimumReleaseAge`; lockfile refresh
tomorrow), 5.6.0 via `@microsoft/teams.apps` (no fixed release).
- @opentelemetry/core <2.8.0: via `@google-cloud/pubsub@5` (fix needs
pubsub 6 major).
- @ai-sdk/provider-utils 2.2.8 / ai 4.x: pinned vendored AI SDK v4 line;
no fixed release in that major.
- extract-zip, deepmerge: no patched version.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR updates Zod and `@hono/node-server` versions in selected
packages, examples, and templates to address security advisories. It
also updates playground form code to work with Zod 4.

## Changes

- Updates selected `zod` dependencies to `^4.6.7`.
- Updates selected `@hono/node-server` dependencies to `2.1.5`.
- Updates the playground form’s IP address and record validators for Zod
4.
- Maps a specific Zod validation error to the message `Required`.
- Adds a patch changeset for `@mastra/playground-ui`.

## Validation

Test results are not provided in the supplied change summary.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: shreyas-mastra <327047572+shreyas-mastra@users.noreply.github.com>
2026-10-30 15:30:35 -04:00
shreyas-mastra
e35d500c14
chore(security): Vanta 2026-10-29 - systeminformation 5.33.16, re2js 2.8.8, provider-utils 3.0.42 (nested lockfiles) (#28852) 2026-10-29 12:49:35 -07:00
Dane - AI (Mastra)
cf92428a76
chore(deps): update docker images (#28011)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| amazon/aws-cli | minor | `2.36.44` → `2.39.1` |
| clickhouse/clickhouse-server | minor | `26.6.1.1193` → `26.10.3.7` |
| cr.weaviate.io/semitechnologies/weaviate | minor | `1.39.13` →
`1.40.3` |
|
[docker.elastic.co/elasticsearch/elasticsearch](https://www.elastic.co/products/elasticsearch)
([source](https://redirect.github.com/elastic/elasticsearch)) | minor |
`9.4.3` → `9.5.5` |
| edoburu/pgbouncer | minor | `v1.25.2-p0` → `v1.26.1-p0` |
|
[ghcr.io/shopify/toxiproxy](https://redirect.github.com/Shopify/toxiproxy)
| minor | `2.12.0` → `2.13.0` |
| inngest/inngest | minor | `v1.34.0` → `v1.49.0` |
| mcr.microsoft.com/azure-storage/azurite | minor | `3.35.0` → `3.37.0`
|
| [mongo](https://hub.docker.com/_/mongo)
([source](https://redirect.github.com/docker-library/mongo)) | patch |
`7.0.37` → `7.0.45` |
| pgvector/pgvector | patch | `0.8.4-pg16` → `0.8.7-pg16` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### Release Notes

<details>
<summary>elastic/elasticsearch
(docker.elastic.co/elasticsearch/elasticsearch)</summary>

###
[`v9.5.5`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.5):
Elasticsearch 9.5.5

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.4...v9.5.5)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.5-release-notes>

###
[`v9.5.4`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.4):
Elasticsearch 9.5.4

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.3...v9.5.4)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.4-release-notes>

###
[`v9.5.3`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.3):
Elasticsearch 9.5.3

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.2...v9.5.3)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.3-release-notes>

###
[`v9.5.2`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.2):
Elasticsearch 9.5.2

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.1...v9.5.2)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.2-release-notes>

###
[`v9.5.1`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.1):
Elasticsearch 9.5.1

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.0...v9.5.1)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.1-release-notes>

###
[`v9.5.0`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.0):
Elasticsearch 9.5.0

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.8...v9.5.0)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.0-release-notes>

###
[`v9.4.8`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.8):
Elasticsearch 9.4.8

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.7...v9.4.8)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.8-release-notes>

###
[`v9.4.7`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.7):
Elasticsearch 9.4.7

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.6...v9.4.7)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.7-release-notes>

###
[`v9.4.6`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.6):
Elasticsearch 9.4.6

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.5...v9.4.6)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.6-release-notes>

###
[`v9.4.5`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.5):
Elasticsearch 9.4.5

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.4...v9.4.5)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.5-release-notes>

###
[`v9.4.4`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.4):
Elasticsearch 9.4.4

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.3...v9.4.4)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.4-release-notes>

</details>

<details>
<summary>Shopify/toxiproxy (ghcr.io/shopify/toxiproxy)</summary>

###
[`v2.13.0`](https://redirect.github.com/Shopify/toxiproxy/blob/HEAD/CHANGELOG.md#2130---2026-10-14)

[Compare
Source](https://redirect.github.com/Shopify/toxiproxy/compare/v2.12.0...v2.13.0)

- Reject slicer toxics with `average_size` <= 0 or `size_variation`
outside `[0, average_size]`,
and stop the slicer from recursing forever on degenerate sizes
([#&#8203;774](https://redirect.github.com/Shopify/toxiproxy/issues/774),
[@&#8203;iyaz-shaikh](https://redirect.github.com/iyaz-shaikh))
- Add optional bearer token auth for the HTTP API via
`TOXIPROXY_AUTH_TOKEN`, supported by the Go
client and `toxiproxy-cli`, and warn when the API is unauthenticated on
a non-loopback address

([#&#8203;774](https://redirect.github.com/Shopify/toxiproxy/issues/774),
[@&#8203;iyaz-shaikh](https://redirect.github.com/iyaz-shaikh))
- Fix removing a toxic hanging forever, and freezing the whole HTTP API,
when the downstream
toxic or connection is already gone
([#&#8203;760](https://redirect.github.com/Shopify/toxiproxy/issues/760),
[@&#8203;matheusgb](https://redirect.github.com/matheusgb))
- Fix the bandwidth toxic hanging or panicking when `rate` <= 0
([#&#8203;764](https://redirect.github.com/Shopify/toxiproxy/issues/764),
[@&#8203;jaideeppyne](https://redirect.github.com/jaideeppyne))
- Update go version to 1.27
([#&#8203;777](https://redirect.github.com/Shopify/toxiproxy/issues/777),
[@&#8203;The-Black-Fox](https://redirect.github.com/The-Black-Fox))
- Update various go packages

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am every weekday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE5Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 15:53:50 +00:00
Dane - AI (Mastra)
9726ebcab4
chore(deps): update security updates [security] (#28238)
> [!NOTE]
> This PR body was truncated due to platform limits.

This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [fast-uri@>=4.0.0
<4.1.5](https://redirect.github.com/fastify/fast-uri) |
pnpm-workspace.overrides | patch | [`4.2.1` →
`4.2.3`](https://renovatebot.com/diffs/npm/fast-uri@>=4.0.0
<4.1.5/4.2.1/4.2.3) | |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | devDependencies |
patch | [`4.13.11` →
`4.13.12`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.12) | |
|
[ip-address@<10.7.1](https://redirect.github.com/beaugunderson/ip-address)
| pnpm-workspace.overrides | patch | [`10.7.2` →
`10.7.4`](https://renovatebot.com/diffs/npm/ip-address@<10.7.1/10.7.2/10.7.4)
| |
| [nodemailer](https://nodemailer.com/)
([source](https://redirect.github.com/nodemailer/nodemailer)) |
dependencies | minor | [`^10.1.1` →
`^10.2.1`](https://renovatebot.com/diffs/npm/nodemailer/10.1.1/10.2.1) |
`10.3.0` |
| [qs](https://redirect.github.com/ljharb/qs) | pnpm-workspace.overrides
| patch | [`6.16.0` →
`6.16.1`](https://renovatebot.com/diffs/npm/qs/6.16.0/6.16.1) | |
| [qs@>=6.7.0 <6.16.0](https://redirect.github.com/ljharb/qs) |
pnpm-workspace.overrides | patch | [`6.16.0` →
`6.16.1`](https://renovatebot.com/diffs/npm/qs@>=6.7.0
<6.16.0/6.16.0/6.16.1) | |
|
[serialize-javascript@<7.0.5](https://redirect.github.com/yahoo/serialize-javascript)
| pnpm-workspace.overrides | minor | [`^7.0.5` →
`^7.1.4`](https://renovatebot.com/diffs/npm/serialize-javascript@<7.0.5/7.0.5/7.1.4)
| |
| [systeminformation@<5.32.0](https://systeminformation.io)
([source](https://redirect.github.com/sebhildebrandt/systeminformation))
| pnpm-workspace.overrides | patch | [`5.33.13` →
`5.33.16`](https://renovatebot.com/diffs/npm/systeminformation@<5.32.0/5.33.13/5.33.16)
| |
| [zod](https://zod.dev)
([source](https://redirect.github.com/colinhacks/zod)) | dependencies |
minor | [`^4.0.0` →
`^4.6.7`](https://renovatebot.com/diffs/npm/zod/4.0.0/4.6.7) | |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### fast-uri vulnerable to scheme injection via an unescaped
first-segment colon in suffix references
[CVE-2026-110725](https://nvd.nist.gov/vuln/detail/CVE-2026-110725) /
[GHSA-333x-w4r6-6crp](https://redirect.github.com/advisories/GHSA-333x-w4r6-6crp)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri`'s `serialize()`, `normalize()`, and `resolve()`, when called
with the non-default option `reference: 'suffix'` on a reference that
has no authority, emit a relative reference whose first path segment
contains a bare colon without escaping it. RFC 3986 section 3.3 requires
the first segment of a `path-noscheme` reference not to contain a colon,
precisely because a bare colon makes the string reparse as an absolute
URI with a scheme. `fast-uri`'s default serialization escapes that
colon, but the suffix path does not.

For example, `normalize('javascript:alert(1)', { reference: 'suffix' })`
returns `javascript:alert(1)`, which reparses as a live `javascript:`
scheme; `data:` and `vbscript:` behave the same.

Applications that serialize or normalize a relative reference with
`reference: 'suffix'` and then treat the result as a URI can turn inert
input into a live `javascript:`, `data:`, or `vbscript:` URL (a
cross-site scripting vector), and `equal()` can conflate a
scheme-bearing reference with a relative one. Exposure is limited to
applications that use the non-default `reference: 'suffix'` option.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Do not use the `reference: 'suffix'` option on untrusted input. If
suffix output is required, percent-encode a colon in the first path
segment of the result before treating it as a URI.

#### Severity
- CVSS Score: 3.7 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-333x-w4r6-6crp](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-333x-w4r6-6crp)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110725](https://nvd.nist.gov/vuln/detail/CVE-2026-110725)
-
[39e6493c13)
-
[a9b8d67353)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)
-
[https://github.com/advisories/GHSA-333x-w4r6-6crp](https://redirect.github.com/advisories/GHSA-333x-w4r6-6crp)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-333x-w4r6-6crp)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to host confusion via unchecked WHATWG host
canonicalization
[CVE-2026-110180](https://nvd.nist.gov/vuln/detail/CVE-2026-110180) /
[GHSA-wjr9-j795-jxcr](https://redirect.github.com/advisories/GHSA-wjr9-j795-jxcr)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri` versions `>= 2.4.2, <= 2.4.7`, `>= 3.1.3, <= 3.1.8`, and `>=
4.0.1, <= 4.2.2` can silently rewrite the host of an HTTP-family URL
(`http`, `https`, `ws`, `wss`, or any scheme with `domainHost: true`).
For those schemes `canonicalizeHost()` passes the parsed host to the
WHATWG `URL` parser and adopts its `.hostname` without checking that the
parser read the whole input as a host. RFC 3986 permits `@` inside the
host group and the WHATWG parser strips TAB, LF, and CR, so the
authority `fast-uri` reports is rewritten by that second parser with no
`error` set: data before an `@` is dropped and whitespace is removed.

For example, `fast-uri` parses `http://a@b@evil.example/` to host
`evil.example` (dropping the `b` segment), and a host containing a raw
TAB, CR, or LF has those characters stripped. `equal()` then treats a
whitespace-smuggled host as the same as the clean one, and `resolve()`
rewrites the authority the same way.

Applications that use `fast-uri` to enforce host-based policy
(denylists, loopback filtering, redirect validation, outbound proxy
routing) on one representation, such as the raw input, see a policy/use
desync: the canonical host `fast-uri` returns differs from what was
checked, and traffic can be steered to an unintended destination.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Reject URIs whose authority contains more than one `@`, or contains TAB,
CR, or LF, before calling `fast-uri`. Alternatively, treat any non-empty
`parse(x).error` as fatal, and compare hosts only from the same
`parse()` result.

#### Severity
- CVSS Score: 4.8 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-wjr9-j795-jxcr](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-wjr9-j795-jxcr)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110180](https://nvd.nist.gov/vuln/detail/CVE-2026-110180)
-
[58c183d0b1)
-
[ddfc6a5112)
-
[f6d46dfeab)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)
-
[https://github.com/advisories/GHSA-wjr9-j795-jxcr](https://redirect.github.com/advisories/GHSA-wjr9-j795-jxcr)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-wjr9-j795-jxcr)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to improper path equivalence in relative
reference normalization
[CVE-2026-110095](https://nvd.nist.gov/vuln/detail/CVE-2026-110095) /
[GHSA-xhq7-xmqj-769h](https://redirect.github.com/advisories/GHSA-xhq7-xmqj-769h)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri`'s `normalize()` and `serialize()` apply RFC 3986 dot-segment
removal (`remove_dot_segments`) to the path of a relative-path
reference. RFC 3986 section 5.2.4 defines that algorithm only for the
merged target path during resolution, not for the reference itself, so
applied to the reference it drops leading `..` segments and can turn a
document-relative reference into a root-relative one.

For example, `normalize('a/../b')` returns `/b` and `normalize('../x')`
returns `x`, so `resolve(base, normalize(ref))` points at a different
resource than `resolve(base, ref)`, and `equal()` treats distinct
references as the same.

Applications that normalize attacker-supplied or user-supplied relative
references and then resolve them, or use them as cache, deduplication,
or authorization keys, can have a reference escape its intended
directory and point at a different resource.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Do not normalize a relative reference before resolving it. Resolve it
against the absolute base first, then normalize the absolute result.

#### Severity
- CVSS Score: 3.7 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-xhq7-xmqj-769h](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-xhq7-xmqj-769h)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110095](https://nvd.nist.gov/vuln/detail/CVE-2026-110095)
-
[048bbd0a25)
-
[52774a5c35)
-
[7c19f8b97e)
-
[9eb8759a98)
-
[acc5c5d60c)
-
[b110a3571c)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)
-
[https://github.com/advisories/GHSA-xhq7-xmqj-769h](https://redirect.github.com/advisories/GHSA-xhq7-xmqj-769h)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-xhq7-xmqj-769h)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to URI scheme spoofing via percent-encoded
scheme decoding
[CVE-2026-110306](https://nvd.nist.gov/vuln/detail/CVE-2026-110306) /
[GHSA-w74x-v6f9-j3xg](https://redirect.github.com/advisories/GHSA-w74x-v6f9-j3xg)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri` percent-decodes the scheme component with the legacy global
`unescape()` before validating it, so an input whose decoded scheme is a
valid but dangerous token is emitted as a live scheme. RFC 3986 section
3.1 does not allow percent-encoding in a scheme, so no RFC or WHATWG
parser treats such input as having that scheme, but `fast-uri` does.

For example, `normalize('%6Aavascript:alert(1)')` returns
`javascript:alert(1)`, `resolve('https://a.example/',
'%6Aavascript:alert(1)')` returns `javascript:alert(1)`, and
`parse('%6Aavascript:alert(1)').scheme` returns `javascript`. The
`%uXXXX` form (`%u006Aavascript:`) produces the same result, and
`equal('%68ttp://a/', 'http://a/')` returns `true`.

An application that screens dangerous schemes on the raw input and then
stores or renders `normalize(input)` or `resolve(base, input)` turns an
inert string into an executable `javascript:`, `data:`, or `vbscript:`
URL, a stored or reflected cross-site scripting vector in the consuming
application. `equal()` also treats an encoded and a plain scheme as the
same, which can bypass equality-based allowlists.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Reject input whose scheme part (before the first `:`, and before any
`/`, `?`, or `#`) contains `%`. Alternatively, check `parse(x).scheme`
against an allowlist after normalization and use that same parsed result
rather than the raw string.

#### Severity
- CVSS Score: 6.1 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-w74x-v6f9-j3xg](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-w74x-v6f9-j3xg)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110306](https://nvd.nist.gov/vuln/detail/CVE-2026-110306)
-
[39933a1f14)
-
[597f254c86)
-
[e60e716f41)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)
-
[https://github.com/advisories/GHSA-w74x-v6f9-j3xg](https://redirect.github.com/advisories/GHSA-w74x-v6f9-j3xg)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-w74x-v6f9-j3xg)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to scheme injection via an unescaped
first-segment colon in suffix references
[CVE-2026-110725](https://nvd.nist.gov/vuln/detail/CVE-2026-110725) /
[GHSA-333x-w4r6-6crp](https://redirect.github.com/advisories/GHSA-333x-w4r6-6crp)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri`'s `serialize()`, `normalize()`, and `resolve()`, when called
with the non-default option `reference: 'suffix'` on a reference that
has no authority, emit a relative reference whose first path segment
contains a bare colon without escaping it. RFC 3986 section 3.3 requires
the first segment of a `path-noscheme` reference not to contain a colon,
precisely because a bare colon makes the string reparse as an absolute
URI with a scheme. `fast-uri`'s default serialization escapes that
colon, but the suffix path does not.

For example, `normalize('javascript:alert(1)', { reference: 'suffix' })`
returns `javascript:alert(1)`, which reparses as a live `javascript:`
scheme; `data:` and `vbscript:` behave the same.

Applications that serialize or normalize a relative reference with
`reference: 'suffix'` and then treat the result as a URI can turn inert
input into a live `javascript:`, `data:`, or `vbscript:` URL (a
cross-site scripting vector), and `equal()` can conflate a
scheme-bearing reference with a relative one. Exposure is limited to
applications that use the non-default `reference: 'suffix'` option.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Do not use the `reference: 'suffix'` option on untrusted input. If
suffix output is required, percent-encode a colon in the first path
segment of the result before treating it as a URI.

#### Severity
- CVSS Score: 3.7 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-333x-w4r6-6crp](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-333x-w4r6-6crp)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110725](https://nvd.nist.gov/vuln/detail/CVE-2026-110725)
-
[39e6493c13)
-
[a9b8d67353)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri](https://redirect.github.com/fastify/fast-uri)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-333x-w4r6-6crp) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to URI scheme spoofing via percent-encoded
scheme decoding
[CVE-2026-110306](https://nvd.nist.gov/vuln/detail/CVE-2026-110306) /
[GHSA-w74x-v6f9-j3xg](https://redirect.github.com/advisories/GHSA-w74x-v6f9-j3xg)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri` percent-decodes the scheme component with the legacy global
`unescape()` before validating it, so an input whose decoded scheme is a
valid but dangerous token is emitted as a live scheme. RFC 3986 section
3.1 does not allow percent-encoding in a scheme, so no RFC or WHATWG
parser treats such input as having that scheme, but `fast-uri` does.

For example, `normalize('%6Aavascript:alert(1)')` returns
`javascript:alert(1)`, `resolve('https://a.example/',
'%6Aavascript:alert(1)')` returns `javascript:alert(1)`, and
`parse('%6Aavascript:alert(1)').scheme` returns `javascript`. The
`%uXXXX` form (`%u006Aavascript:`) produces the same result, and
`equal('%68ttp://a/', 'http://a/')` returns `true`.

An application that screens dangerous schemes on the raw input and then
stores or renders `normalize(input)` or `resolve(base, input)` turns an
inert string into an executable `javascript:`, `data:`, or `vbscript:`
URL, a stored or reflected cross-site scripting vector in the consuming
application. `equal()` also treats an encoded and a plain scheme as the
same, which can bypass equality-based allowlists.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Reject input whose scheme part (before the first `:`, and before any
`/`, `?`, or `#`) contains `%`. Alternatively, check `parse(x).scheme`
against an allowlist after normalization and use that same parsed result
rather than the raw string.

#### Severity
- CVSS Score: 6.1 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-w74x-v6f9-j3xg](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-w74x-v6f9-j3xg)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110306](https://nvd.nist.gov/vuln/detail/CVE-2026-110306)
-
[39933a1f14)
-
[597f254c86)
-
[e60e716f41)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri](https://redirect.github.com/fastify/fast-uri)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-w74x-v6f9-j3xg) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to host confusion via unchecked WHATWG host
canonicalization
[CVE-2026-110180](https://nvd.nist.gov/vuln/detail/CVE-2026-110180) /
[GHSA-wjr9-j795-jxcr](https://redirect.github.com/advisories/GHSA-wjr9-j795-jxcr)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri` versions `>= 2.4.2, <= 2.4.7`, `>= 3.1.3, <= 3.1.8`, and `>=
4.0.1, <= 4.2.2` can silently rewrite the host of an HTTP-family URL
(`http`, `https`, `ws`, `wss`, or any scheme with `domainHost: true`).
For those schemes `canonicalizeHost()` passes the parsed host to the
WHATWG `URL` parser and adopts its `.hostname` without checking that the
parser read the whole input as a host. RFC 3986 permits `@` inside the
host group and the WHATWG parser strips TAB, LF, and CR, so the
authority `fast-uri` reports is rewritten by that second parser with no
`error` set: data before an `@` is dropped and whitespace is removed.

For example, `fast-uri` parses `http://a@b@evil.example/` to host
`evil.example` (dropping the `b` segment), and a host containing a raw
TAB, CR, or LF has those characters stripped. `equal()` then treats a
whitespace-smuggled host as the same as the clean one, and `resolve()`
rewrites the authority the same way.

Applications that use `fast-uri` to enforce host-based policy
(denylists, loopback filtering, redirect validation, outbound proxy
routing) on one representation, such as the raw input, see a policy/use
desync: the canonical host `fast-uri` returns differs from what was
checked, and traffic can be steered to an unintended destination.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Reject URIs whose authority contains more than one `@`, or contains TAB,
CR, or LF, before calling `fast-uri`. Alternatively, treat any non-empty
`parse(x).error` as fatal, and compare hosts only from the same
`parse()` result.

#### Severity
- CVSS Score: 4.8 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-wjr9-j795-jxcr](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-wjr9-j795-jxcr)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110180](https://nvd.nist.gov/vuln/detail/CVE-2026-110180)
-
[58c183d0b1)
-
[ddfc6a5112)
-
[f6d46dfeab)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri](https://redirect.github.com/fastify/fast-uri)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-wjr9-j795-jxcr) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### fast-uri vulnerable to improper path equivalence in relative
reference normalization
[CVE-2026-110095](https://nvd.nist.gov/vuln/detail/CVE-2026-110095) /
[GHSA-xhq7-xmqj-769h](https://redirect.github.com/advisories/GHSA-xhq7-xmqj-769h)

<details>
<summary>More information</summary>

#### Details
##### Impact

`fast-uri`'s `normalize()` and `serialize()` apply RFC 3986 dot-segment
removal (`remove_dot_segments`) to the path of a relative-path
reference. RFC 3986 section 5.2.4 defines that algorithm only for the
merged target path during resolution, not for the reference itself, so
applied to the reference it drops leading `..` segments and can turn a
document-relative reference into a root-relative one.

For example, `normalize('a/../b')` returns `/b` and `normalize('../x')`
returns `x`, so `resolve(base, normalize(ref))` points at a different
resource than `resolve(base, ref)`, and `equal()` treats distinct
references as the same.

Applications that normalize attacker-supplied or user-supplied relative
references and then resolve them, or use them as cache, deduplication,
or authorization keys, can have a reference escape its intended
directory and point at a different resource.

##### Patches

Upgrade to `fast-uri` `2.4.8`, `3.1.9`, or `4.2.3`.

##### Workarounds

Do not normalize a relative reference before resolving it. Resolve it
against the absolute base first, then normalize the absolute result.

#### Severity
- CVSS Score: 3.7 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

#### References
-
[https://github.com/fastify/fast-uri/security/advisories/GHSA-xhq7-xmqj-769h](https://redirect.github.com/fastify/fast-uri/security/advisories/GHSA-xhq7-xmqj-769h)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-110095](https://nvd.nist.gov/vuln/detail/CVE-2026-110095)
-
[048bbd0a25)
-
[52774a5c35)
-
[7c19f8b97e)
-
[9eb8759a98)
-
[acc5c5d60c)
-
[b110a3571c)
-
[https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
-
[https://github.com/fastify/fast-uri](https://redirect.github.com/fastify/fast-uri)
-
[https://github.com/fastify/fast-uri/releases/tag/v2.4.8](https://redirect.github.com/fastify/fast-uri/releases/tag/v2.4.8)
-
[https://github.com/fastify/fast-uri/releases/tag/v3.1.9](https://redirect.github.com/fastify/fast-uri/releases/tag/v3.1.9)
-
[https://github.com/fastify/fast-uri/releases/tag/v4.2.3](https://redirect.github.com/fastify/fast-uri/releases/tag/v4.2.3)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-xhq7-xmqj-769h) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Hono: `serveStatic` decodes the request path a second time, leading
to bypass of middleware on static paths
[CVE-2026-109955](https://nvd.nist.gov/vuln/detail/CVE-2026-109955) /
[CVE-2026-111757](https://nvd.nist.gov/vuln/detail/CVE-2026-111757) /
[GHSA-5r4p-p66f-jhc7](https://redirect.github.com/advisories/GHSA-5r4p-p66f-jhc7)

<details>
<summary>More information</summary>

#### Details
##### Summary

`serveStatic` decodes the request path a second time after Hono has
already decoded it for routing. A crafted request can be routed as one
path and served as another, so middleware mounted on a static prefix
does not run for a file under that prefix.

##### Details

Hono decodes the request path once before routing. `serveStatic` decoded
it again before resolving the file. With a malformed percent-encoded
sequence, the first decode leaves part of the path encoded, the router
matches the encoded form, and the second decode resolves the real
directory. The file is still resolved inside the configured root; this
is not a traversal outside it.

##### Impact

An unauthenticated attacker may reach static files without the
middleware on their prefix running, for example an authentication check.
This affects applications that mount middleware on part of the directory
served by `serveStatic`. Applications that serve only public files are
not affected.

#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-5r4p-p66f-jhc7](https://redirect.github.com/honojs/hono/security/advisories/GHSA-5r4p-p66f-jhc7)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-111757](https://nvd.nist.gov/vuln/detail/CVE-2026-111757)
-
[8b05c774ef)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.11](https://redirect.github.com/honojs/hono/releases/tag/v4.13.11)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-5r4p-p66f-jhc7) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### ip-address: Address6 matches a zone identifier in quadratic time
ahead of its length limit, allowing a single long string to stall the
process
[CVE-2026-111997](https://nvd.nist.gov/vuln/detail/CVE-2026-111997) /
[GHSA-rxp7-6hxx-x8q5](https://redirect.github.com/advisories/GHSA-rxp7-6hxx-x8q5)

<details>
<summary>More information</summary>

#### Details
##### Summary

`new Address6()` and `Address6.isValid()` strip a zone identifier with
the pattern `/%.*$/` before they apply the 45-character length limit.
When the string holds many `%` characters followed by a line terminator,
the pattern is retried from every `%` and each attempt scans to the line
terminator before failing, so rejecting the string takes time
proportional to the square of its length. 10,000 `%` characters and a
newline take 41 ms, 40,000 take 632 ms and 100,000 take 3.9 s of
synchronous work. The same strings without the newline are rejected in
under a millisecond.

An application that validates an attacker-supplied string with these
methods can be stalled by a single long request. The input is rejected
with the correct `AddressError`; the cost of reaching that rejection is
the defect.

##### Details

The constructor in `src/ipv6.ts` removes the CIDR suffix, then the zone,
then checks the length of what is left:

```ts
const zone = constants6.RE_ZONE_STRING.exec(address);

if (zone) {
  this.zone = zone[0];

  address = address.replace(constants6.RE_ZONE_STRING, '');
}

const longest = this.groups * 5 + 5;

if (address.length > longest) {
  throw new AddressError(`IPv6 addresses are at most ${longest} characters.`);
}
```

`RE_ZONE_STRING` is `/%.*$/`. It has no anchor at its start, `.` does
not match a line terminator (`\n`, `\r`, U+2028 or U+2029), and without
the `m` flag `$` matches only at the end of the input. For `%` repeated
N times and then `\n`, the engine starts a match at the first `%`, `.*`
consumes the remaining `%` characters up to the newline, `$` fails
there, and backtracking through every shorter `.*` fails too. The engine
then starts again at the second `%`, and so on: N starts, each
proportional to N. The length limit that follows rejects the string in
constant time, after the scan has already run.

The line terminator need not be last. Any string in which many `%`
characters precede a line terminator behaves the same way.

Every entry point that passes a caller's string to the `Address6`
constructor is affected: `new Address6()`, `isValid()`, both arguments
of `fromAddressAndMask()` and `fromAddressAndWildcardMask()`, and the
prefix argument of `fromAddress4Nat64()` and `toAddress4Nat64()`.
`fromWildcard()` rejects a `%` before it constructs anything,
`fromURL()` admits only hex digits, colons and dots in a host, and
`fromArpa()` checks the nibble grammar first, so those three are
unaffected. `Address4` has no zone and is unaffected.

##### Affected versions

`<= 10.7.3`. The zone pattern has been in the constructor since 1.0.0;
5.9.4, 9.0.5 and 10.7.0 show the same timings as 10.7.3.

##### Impact

`Address6.isValid()` on N `%` characters and a newline, measured on
ip-address 10.7.3 and node 24.21.0:

| Input | Wall time | Same length of `!` |
|---|---|---|
| 5,461 characters | 13 ms | 0.1 ms |
| 16 KiB | 108 ms | 0.1 ms |
| 100 KB | 3.9 s | 0.1 ms |
| 256 KiB | 27 s | 0.2 ms |

The parse is synchronous, so the event loop is blocked for the whole of
the wall time and nothing else on that process is served. No memory is
retained and the process resumes when the call returns.

##### Reachability

The input needs a line terminator after the `%` characters, which
decides where it can arrive. An HTTP header value cannot carry a
carriage return or a line feed, so a host or address taken from a header
does not reach this. A URL can carry both characters percent-encoded at
three bytes each, and Node's default 16 KB limit on the request line and
headers admits about 5,461 of them: 13 ms. A request body is where the
larger sizes come from. Common body parsers default to between 100 KB
and 1 MB, and at 100 KB one field passed to the parser unchecked blocks
the process for 3.9 s.

##### Proof of concept

`npm i ip-address@10.7.3`, then:

```js
const { Address6 } = require('ip-address');

function time(input) {
  const start = process.hrtime.bigint();

  Address6.isValid(input);

  return `${(Number(process.hrtime.bigint() - start) / 1e6).toFixed(1)} ms`;
}

for (const n of [10000, 20000, 40000, 100000]) {
  console.log(`${n}: ${time(`${'%'.repeat(n)}\n`)}, without the newline ${time('%'.repeat(n))}`);
}
```

On affected versions (node 24.21.0):

```
10000: 41.0 ms, without the newline 0.0 ms
20000: 161.1 ms, without the newline 0.0 ms
40000: 632.4 ms, without the newline 0.1 ms
100000: 3899.8 ms, without the newline 0.1 ms
```

Each doubling of the input multiplies the time by four.

##### Remediation

Upgrade to the patched release. In the fix, the constructor finds the
zone by the index of the first `%` and accepts the remainder as a zone
only when it holds no line terminator, which reads the input once. 1 MiB
of the input above is rejected in about a millisecond. Every address
that parsed before parses to the same result, and a string with a line
terminator after a `%` is rejected as it was.

`RE_ZONE_STRING` stays exported from `v6/constants` for code that
imports it directly and is marked `@deprecated`; the library itself does
not call it.

If you cannot upgrade immediately, reject a candidate longer than an
address with a zone identifier can be before you parse it:

```js
if (host.length > 64) throw new Error('not an IP address');
```

#### Severity
- CVSS Score: 6.3 / 10 (Medium)
- Vector String:
`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`

#### References
-
[https://github.com/beaugunderson/ip-address/security/advisories/GHSA-rxp7-6hxx-x8q5](https://redirect.github.com/beaugunderson/ip-address/security/advisories/GHSA-rxp7-6hxx-x8q5)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-111997](https://nvd.nist.gov/vuln/detail/CVE-2026-111997)
-
[ec80fcd5d7)
-
[https://github.com/beaugunderson/ip-address](https://redirect.github.com/beaugunderson/ip-address)
-
[https://github.com/beaugunderson/ip-address/releases/tag/v10.7.4](https://redirect.github.com/beaugunderson/ip-address/releases/tag/v10.7.4)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-rxp7-6hxx-x8q5) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Nodemailer: A ">" inside a quoted local part ends an angle-addr
early in addressparser, delivering to a domain the header does not name

[GHSA-85x2-q946-cp5h](https://redirect.github.com/advisories/GHSA-85x2-q946-cp5h)

<details>
<summary>More information</summary>

#### Details
##### Vulnerability summary

addressparser ends an angle-addr at the first `>` it sees, including one
inside a quoted local part, a comment or a domain literal. The domain is
then read off the text in front of that `>`. `<"a@evil.com>"@good.com>`
is the mailbox `"a@evil.com>"@good.com` under RFC 5322, and Nodemailer
read it as an address at `evil.com`. The unbracketed spelling of the
same value was already read correctly. Affected: 3.0.0 through 10.1.3.

##### Attacker capabilities

The attacker controls the text of a recipient or sender address that an
application passes to Nodemailer, for example a To value entered in a
contact or invite form, or the header of an inbound message parsed with
mailparser. No access to the application, its configuration or its
credentials is needed. The value is a syntactically valid RFC 5322
address that conformant parsers accept without defects.

##### Realistic exploitation scenario

An application lets users send invitations or notifications only to
addresses at an allowed domain and validates the submitted value with a
conformant parser or by checking its domain. The attacker submits
`<"a@evil.com>"@good.com>`, which validates as a `good.com` mailbox.
Nodemailer then parses the same value, issues `RCPT TO:<"\"a"@evil.com>`
and the message, with whatever content the application puts into it, is
delivered to the attacker's domain. The security boundary crossed is the
application's recipient allow list. In the inbound direction, mailparser
reports a different address than a conformant reader of the same header,
so a display or policy layer built on the two disagrees.

##### Proof of concept

```js
const addressparser = require('nodemailer/lib/addressparser');
console.log(addressparser("<\"a@evil.com>\"@good.com>"));
// [ { address: '"a@evil.com', name: '@good.com>' } ]
```

Python's `email._header_value_parser.get_address_list` reads the same
value as `"a@evil.com>"@good.com`, with no defects reported.

The envelope a message gets is built from the same parse, so `sendMail({
to: "<\"a@evil.com>\"@good.com>" })` issues the RCPT TO shown above.

##### Security impact

Mail that an application intends for an allowed domain is delivered to a
domain chosen by the attacker, which discloses its content. It is a
security vulnerability rather than a parsing bug because the misreading
only occurs for values that a conformant validator approves, so
validation done the right way is bypassed. Affected are applications
that pass user influenced addresses to Nodemailer and consumers of the
standalone parser such as mailparser.

The fix tracks quoted strings, comments and domain literals inside an
angle-addr and reads only a `>` outside them.

Found in an internal review of addressparser on 2026-10-18. Verified on
3.0.0, 6.9.16 and 10.1.3.

#### Severity
- CVSS Score: 6.5 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`

#### References
-
[https://github.com/nodemailer/nodemailer/security/advisories/GHSA-85x2-q946-cp5h](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-85x2-q946-cp5h)
-
[1cd57d2b8c)
-
[https://github.com/nodemailer/nodemailer](https://redirect.github.com/nodemailer/nodemailer)
-
[https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-85x2-q946-cp5h) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Nodemailer: A nested comment ends early in addressparser, releasing
the rest of the comment as a recipient

[GHSA-8c8m-p3m8-cjg8](https://redirect.github.com/advisories/GHSA-8c8m-p3m8-cjg8)

<details>
<summary>More information</summary>

#### Details
##### Vulnerability summary

RFC 5322 comments nest. addressparser ended a comment at the first `)`,
including the one that closes a nested comment, and parsed the rest of
the outer comment as header text. `Victim (x(y) <evil@evil.com>)
<v@victim.com>` names `v@victim.com` with `x(y) <evil@evil.com>` as a
comment, and Nodemailer read it as the address `evil@evil.com`. This is
the same shape as the escaped parenthesis fixed in 10.1.2, reached
through nesting instead of a quoted-pair. Affected: 3.0.0 through
10.1.3.

##### Attacker capabilities

The attacker controls the text of an address that an application passes
to Nodemailer, or the From or To header of an inbound message parsed
with mailparser. No access to the application, its configuration or its
credentials is needed. The value is a syntactically valid RFC 5322
address that conformant parsers accept without defects.

##### Realistic exploitation scenario

An application validates a submitted address with a conformant parser
and allows only its own domain. The attacker submits `Victim (x(y)
<evil@evil.com>) <v@victim.com>`, which validates as `v@victim.com`.
Nodemailer delivers to `evil@evil.com`. In the inbound direction, a
DMARC or display layer built on a conformant parser and a mail client
built on mailparser disagree on the author of the same message, which is
the setting for sender spoofing. The boundary crossed is the
application's recipient allow list, or the author check of the receiving
side.

##### Proof of concept

```js
const addressparser = require('nodemailer/lib/addressparser');
console.log(addressparser("Victim (x(y) <evil@evil.com>) <v@victim.com>"));
// [ { address: 'evil@evil.com', name: 'Victim) v@victim.com' } ]
```

Python's `email._header_value_parser.get_address_list` reads the same
value as `v@victim.com` with the display name `Victim`, with no defects
reported.

The envelope a message gets is built from the same parse, so `sendMail({
to: "Victim (x(y) <evil@evil.com>) <v@victim.com>" })` issues the RCPT
TO shown above.

##### Security impact

Mail intended for an approved recipient is delivered to an attacker
chosen domain, disclosing its content, and parsers built on this module
report a different author than conformant ones. The misreading only
occurs on values a conformant validator approves, so correct validation
is bypassed. Affected are applications that pass user influenced
addresses to Nodemailer and consumers of the standalone parser such as
mailparser.

The fix counts comment depth and ends a comment only at the `)` that
closes the outermost one.

Found in an internal review of addressparser on 2026-10-18. Verified on
3.0.0, 6.9.16 and 10.1.3.

#### Severity
- CVSS Score: 6.5 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`

#### References
-
[https://github.com/nodemailer/nodemailer/security/advisories/GHSA-8c8m-p3m8-cjg8](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-8c8m-p3m8-cjg8)
-
[0a8761762a)
-
[https://github.com/nodemailer/nodemailer](https://redirect.github.com/nodemailer/nodemailer)
-
[https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-8c8m-p3m8-cjg8) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Nodemailer: A ";" inside a quoted string or comment ends an address
group early in addressparser, turning display text into a recipient

[GHSA-m943-m63m-w62w](https://redirect.github.com/advisories/GHSA-m943-m63m-w62w)

<details>
<summary>More information</summary>

#### Details
##### Vulnerability summary

addressparser ends an RFC 5322 group at the first `;`, including one
inside a quoted display name or a comment. The text after it is parsed
again as top level recipients with the quoting flipped, so text that
every conformant parser reads as a display name or comment becomes a
live address. `G: (a; <evil@evil.com>) <v@victim.com>;` names only
`v@victim.com`, and Nodemailer read it as the single recipient
`evil@evil.com`. Affected: 3.0.0 through 10.1.3.

##### Attacker capabilities

The attacker controls the text of an address field that an application
passes to Nodemailer, or the header of an inbound message parsed with
mailparser. No access to the application, its configuration or its
credentials is needed. The value is a syntactically valid RFC 5322 group
that conformant parsers accept without defects.

##### Realistic exploitation scenario

An application validates the recipients of a submitted address list with
a conformant parser and only allows addresses at its own domain. The
attacker submits `G: (a; <evil@evil.com>) <v@victim.com>;`. The
validator sees one mailbox, `v@victim.com`, and approves it. Nodemailer
delivers to `evil@evil.com` only. The same works through a quoted
display name, `G: "a;" "<evil@evil.com>" <v@victim.com>;`. The boundary
crossed is the application's recipient allow list.

##### Proof of concept

```js
const addressparser = require('nodemailer/lib/addressparser');
console.log(addressparser("G: (a; <evil@evil.com>) <v@victim.com>;"));
// [ { name: 'G', group: [ [Object] ] }, { address: 'evil@evil.com', name: ') v@victim.com' } ]
```

Python's `email._header_value_parser.get_address_list` reads the same
value as the single mailbox `v@victim.com`, with no defects reported.

The envelope a message gets is built from the same parse, so `sendMail({
to: "G: (a; <evil@evil.com>) <v@victim.com>;" })` issues the RCPT TO
shown above.

##### Security impact

Mail that an application intends for an approved recipient goes to a
recipient chosen by the attacker, which discloses its content, and the
intended recipient never receives it. The misreading only occurs on
values a conformant validator approves, so correct validation is
bypassed, which makes it a security issue rather than a parsing bug.
Affected are applications that pass user influenced address lists to
Nodemailer and consumers of the standalone parser such as mailparser.

The fix tracks quoted strings and comments inside a group and reads only
a `;` outside them.

Found in an internal review of addressparser on 2026-10-18. Verified on
3.0.0, 6.9.16 and 10.1.3.

#### Severity
- CVSS Score: 6.5 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`

#### References
-
[https://github.com/nodemailer/nodemailer/security/advisories/GHSA-m943-m63m-w62w](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-m943-m63m-w62w)
-
[1cd57d2b8c)
-
[https://github.com/nodemailer/nodemailer](https://redirect.github.com/nodemailer/nodemailer)
-
[https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-m943-m63m-w62w) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### qs : qs.stringify with arrayFormat 'comma' throws an uncaught
TypeError on array elements carrying a non-callable own toString (DoS)
[CVE-2026-110816](https://nvd.nist.gov/vuln/detail/CVE-2026-110816) /
[GHSA-6pq8-jhm2-2vcw](https://redirect.github.com/advisories/GHSA-6pq8-jhm2-2vcw)

<details>
<summary>More information</summary>

#### Details
##### Summary

`qs.stringify(obj, { arrayFormat: 'comma' })` throws an uncaught
`TypeError: Cannot convert object to primitive value` when an array in
`obj` contains an element that carries an own, non-callable `toString`
property (for example `{ a: [ { toString: 'x' } ] }`). A remote,
unauthenticated attacker who can influence an object that the
application later re-serializes with the comma array format triggers the
throw. In a service that lacks a synchronous error boundary around the
serialization call, the uncaught exception crashes the worker process,
producing a denial of service.

##### Root Cause

When `arrayFormat: 'comma'` is selected, the comma branch collapses the
whole array into a single value via `Array.prototype.join`, or, under
`encodeValuesOnly: true`, maps each element through the value encoder
before joining. Both paths perform an implicit string coercion
(`ToPrimitive` with hint `"string"`) on each element. For an object
whose own `toString` is a non-callable value, coercion skips the
shadowed non-callable `toString`, falls through to
`Object.prototype.valueOf` (which returns the object rather than a
primitive), and throws. The comma branch runs this coercion before the
per-element null and skip handling in the main loop, so nothing
downstream can neutralize the hostile element, and the throw is never
caught inside the library.

```text
lib/stringify.js  (comma-array branch)
  line 152-154: obj = utils.maybeMap(obj, function (v) { return v == null ? v : encoder(v); });  // encodeValuesOnly path
  line 156:     objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];   // default comma path
lib/utils.js
  line 292:     string = String(str);   // value encoder coercion reached via the encodeValuesOnly path
```

##### Impact

Prerequisites: the application calls `qs.stringify` with `arrayFormat:
'comma'` (a documented, supported option) on an object whose shape can
be influenced by attacker input. Attacker-controllable sources include
`qs.parse(input, { allowPrototypes: true })`, which retains a `toString`
segment (Express 4's default query parser, Express 5's `extended` query
parser, and body-parser's `extended` urlencoded parser all set it),
`qs.parse(input, { plainObjects: true })`, whose null-prototype elements
throw even without a `toString` key (eg, `a[][b]=c`), and `JSON.parse`
of a request body, which needs no qs parse option at all. No
authentication or user interaction is required. Demonstrated capability:
a single request forces an uncaught synchronous `TypeError` in the
serialization call. In a naive single-process Node service with no
synchronous error boundary, this crashes the process and takes the
service offline (availability impact). Under a framework such as Express
that traps synchronous handler throws, the plausible outcome is a
per-request 500 rather than a full outage; that lower-impact case is
noted but not the worst credible supported deployment. There is no
confidentiality or integrity impact, no memory unsafety, and no
prototype pollution.

##### Proof of Concept

`Install qs at the affected version (for example 6.16.0) and run the
following script with Node.js. No network setup is required; it
demonstrates the throw in isolation.`

```js
var qs = require('qs');

// Source A: qs.parse with allowPrototypes retains the hostile toString segment
qs.stringify(qs.parse('a[0][toString]=x', { allowPrototypes: true }), { arrayFormat: 'comma' });

// Source B: a JSON request body, no qs parse option needed
qs.stringify(JSON.parse('{"a":[{"toString":"x"}]}'), { arrayFormat: 'comma' });

// Also affected: the encodeValuesOnly sub-path
qs.stringify(JSON.parse('{"a":[{"toString":"x"}]}'), { arrayFormat: 'comma', encodeValuesOnly: true });
```

```text
A default-join (allowPrototypes) => THREW: TypeError: Cannot convert object to primitive value
B default-join (JSON.parse) => THREW: TypeError: Cannot convert object to primitive value
C encodeValuesOnly path => THREW: TypeError: Cannot convert object to primitive value
N2 callable toString => NO THROW; output="a=z"
N3 isBuffer vector (CVE-2026-82417) => NO THROW; output="a%5Bconstructor%5D%5BisBuffer%5D=x"
qs version: 6.16.0
```

##### Attack Chain

1. **Exposure:** A remote, unauthenticated request reaches an endpoint
whose handler eventually serializes attacker-influenced data with
`qs.stringify(obj, { arrayFormat: 'comma' })`.
2. **Control:** The attacker supplies data that becomes `{ a: [ {
toString: <non-callable value> } ] }`, either via `a[0][toString]=x`
parsed with `allowPrototypes`, or via a JSON body
`{"a":[{"toString":"x"}]}`.
3. **Path:** In `stringify`, the primitive/buffer guard at
`lib/stringify.js:134` is false for an array, so control reaches the
comma branch at `lib/stringify.js:149`.
4. **Guard:** On the `encodeValuesOnly` path, the closure `v == null ? v
: encoder(v)` at `lib/stringify.js:152-154` passes only
`null`/`undefined` through; a non-null object still reaches the encoder.
The default path skips that closure entirely and reaches `obj.join(',')`
at `lib/stringify.js:156` with no guard at all.
5. **Primitive:** The element is coerced to a string
(`Array.prototype.join`, or `String(str)` at `lib/utils.js:292`).
`ToPrimitive` skips the non-callable own `toString`, `valueOf` returns
the object, and a `TypeError` is thrown.
6. **Result:** The uncaught synchronous exception propagates out of the
serialization call, failing the request and, in a service without a
synchronous error boundary, crashing the process (denial of service).

##### Bypass Evidence

This is a different element type on the code path CVE-2026-8723
(GHSA-q8mj-m7cp-5q26) patche

> [!IMPORTANT]
> ✂ PR body was truncated to here.

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 13:45:34 +00:00
Dane - AI (Mastra)
f6cd11f348
chore(deps): lock file maintenance (#28672)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am on wednesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 10:02:15 +00:00
Dane - AI (Mastra)
07c1bf2362
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.42 (#28773) 2026-10-28 18:08:16 -07:00
Dane - AI (Mastra)
f2ad3844f3
chore(deps): update opentelemetry (#28581)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 16:48:54 -07:00
Dane - AI (Mastra)
29747ebd1d
chore(deps): update better-auth monorepo to v1.7.13 (#28538)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[@better-auth/drizzle-adapter@<1.7.7](https://www.better-auth.com/docs/adapters/drizzle)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/drizzle-adapter))
| pnpm-workspace.overrides | patch | [`1.7.7` →
`1.7.13`](https://renovatebot.com/diffs/npm/@better-auth%2fdrizzle-adapter@<1.7.7/1.7.7/1.7.13)
| `1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| pnpm-workspace.overrides | patch | [`^1.7.7` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.7/1.7.13) |
`1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| dependencies | patch | [`^1.7.12` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.12/1.7.13)
| `1.7.14` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### Release Notes

<details>
<summary>better-auth/better-auth
(@&#8203;better-auth/drizzle-adapter@<1.7.7)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11731](https://redirect.github.com/better-auth/better-auth/pull/11731)
[`0cfe07d`](0cfe07dccd)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Drizzle schemas that store dates in string columns now work:
`timestamp({ mode: "string" })`, MySQL `datetime({ mode: "string" })`,
and SQLite `text()`, including on Cloudflare D1. Before, the adapter
passed a JavaScript `Date` to those columns. Drivers such as
postgres-js, better-sqlite3 and D1 rejected it, so email sign-up, social
sign-in and session refresh failed. Filtering on those columns, for
example when listing sessions, failed the same way. Better Auth now
writes these dates as UTC text and reads a value without a time zone as
UTC.

If your server's time zone is not UTC and you use node-postgres or
mysql2 with a string column that has no time zone, existing rows were
written in the server's local time. They now read back shifted by the
server's UTC offset, so sessions and verification codes created before
the upgrade can expire early or late. Schemas generated by the CLI use
date columns and are unaffected.

</details>

<details>
<summary>better-auth/better-auth (better-auth)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

##### Patch Changes

-
[#&#8203;11985](https://redirect.github.com/better-auth/better-auth/pull/11985)
[`9cb95fe`](9cb95fe3d0)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Type
declarations no longer list type-only exports as values, so importing
one as a value now fails type checking instead of failing at runtime.

- Updated dependencies
\[[`2712441`](2712441e35),
[`1cf4b2c`](1cf4b2c8f5)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.13
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.13
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.13
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.13
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.13
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.13
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.13

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

##### Patch Changes

-
[#&#8203;11925](https://redirect.github.com/better-auth/better-auth/pull/11925)
[`fb48619`](fb48619083)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - The JWT
plugin now verifies JWTs and session cookie-cache JWTs with the
algorithm of the stored key instead of the one named in the token
header, and logs a warning when it signs or verifies a JWT without an
issuer or audience.

-
[#&#8203;11924](https://redirect.github.com/better-auth/better-auth/pull/11924)
[`681aa5c`](681aa5c443)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
`auth.api.getSession()` now keeps the original database error as
`error.cause` when the session lookup fails, so server code can tell a
transient failure from a bug.

-
[#&#8203;11930](https://redirect.github.com/better-auth/better-auth/pull/11930)
[`b18e3b8`](b18e3b8fdf)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - OAuth
callbacks completed through the OAuth proxy now run the same checks as
the standard OAuth callback, including issuer and ID token nonce
validation.

- Updated dependencies
\[[`681aa5c`](681aa5c443),
[`4bc78ba`](4bc78baa83),
[`876608d`](876608da86),
[`083a743`](083a74329b),
[`492134a`](492134aeba)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.12
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.12
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.12
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.12
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.12
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.12
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.12

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

##### Patch Changes

-
[#&#8203;10719](https://redirect.github.com/better-auth/better-auth/pull/10719)
[`bd65db0`](bd65db02c1)
Thanks [@&#8203;rendermani](https://redirect.github.com/rendermani)! -
Recognize PostgreSQL `int8` as a valid number type in migration diffs.
Kysely's introspector reports `pg_type.typname`, so Better Auth's own
`bigint` columns (such as the database-backed rate limiter's
`lastRequest`) came back as `int8` and were reported as a type mismatch
on every run.

-
[#&#8203;11521](https://redirect.github.com/better-auth/better-auth/pull/11521)
[`37a75c9`](37a75c95d1)
Thanks [@&#8203;aryan1306](https://redirect.github.com/aryan1306)! - Fix
database-backed rate limiting returning an excessively large
`X-Retry-After` header instead of the remaining seconds in the
rate-limit window.

- Updated dependencies
\[[`ce96569`](ce965696d1),
[`2f6ca3f`](2f6ca3f370),
[`dfd8dd2`](dfd8dd287a)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.11
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.11
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.11
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.11
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.11
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.11
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.11

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

##### Patch Changes

-
[#&#8203;11393](https://redirect.github.com/better-auth/better-auth/pull/11393)
[`eebd47a`](eebd47a0e7)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - If
you use the `lastLoginMethod` plugin with `oneTap`, signing in through
Google One Tap now records `"google"`, the same value as signing in with
the Google button. Before, a One Tap sign-in recorded nothing: the
`better-auth.last_used_login_method` cookie kept its previous value or
stayed unset, and so did `user.lastLoginMethod` with `storeInDatabase`.

If your `customResolveMethod` includes a `/one-tap/callback` →
`"google"` workaround, remove that mapping; keep the resolver if it
handles other routes.

-
[#&#8203;11821](https://redirect.github.com/better-auth/better-auth/pull/11821)
[`09d07e6`](09d07e6fea)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- The Google One Tap prompt (`authClient.oneTap()` without `button`) no
longer calls `getSkippedReason()`, which Google's FedCM migration guide
says to remove. Before, it called it under any `promptOptions.fedCM`
setting.

A skipped prompt now ends the flow and calls `onPromptNotification`
right away instead of retrying. Google doesn't report why a prompt was
skipped, and a prompt the user closed stays hidden for Google's cooldown
period, so the retries could not bring it back. Dismissed prompts still
retry as before.

Google Identity Services still logs its FedCM migration warning, because
it does so whenever `prompt()` receives a listener. The plugin needs the
listener to track dismissals and skips, so the warning is expected and
safe to ignore.

-
[#&#8203;11819](https://redirect.github.com/better-auth/better-auth/pull/11819)
[`eaecb72`](eaecb7229e)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Google One Tap now applies your
`socialProviders.google.mapProfileToUser` and custom `getUserInfo`, the
same as the standard Google sign-in. Before, One Tap ignored both and
always stored the token's `name`, `email`, `email_verified`, and
`picture` claims.

If you configured either one, users created through One Tap now get the
fields it returns, including any extra fields such as a first name from
`given_name`. Returning users are updated from it on each One Tap
sign-in when `socialProviders.google.overrideUserInfoOnSignIn` is on,
and so are existing users that One Tap links when
`account.accountLinking.updateUserInfoOnLink` is on. Check that your
mapper suits One Tap users too.

If you set `socialProviders.google.overrideUserInfoOnSignIn`, One Tap
sign-ins now update returning users' name, image, and email from Google,
as the redirect sign-in already does.

Setups that configure none of these, including `oneTap({ clientId })`
with no Google provider, are unaffected.

-
[#&#8203;11820](https://redirect.github.com/better-auth/better-auth/pull/11820)
[`88c9a37`](88c9a37856)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- If you set `autoSelect` or `cancelOnTapOutside` on `oneTapClient()`,
the One Tap prompt and the Sign in with Google button now use them.
Before, only values passed to `authClient.oneTap()` took effect, so with
`autoSelect: true` on the plugin, returning users still had to pick an
account. Values passed to `oneTap()` still override the plugin's. Apps
that set these options only on `oneTap()`, or not at all, are
unaffected.

-
[#&#8203;11696](https://redirect.github.com/better-auth/better-auth/pull/11696)
[`0cf1f7c`](0cf1f7c6bc)
Thanks [@&#8203;drewsephski](https://redirect.github.com/drewsephski)! -
You can now import the One Tap plugin from
`better-auth/plugins/one-tap`, as you can for other plugins. Previously
this import failed with a "not exported" error. Imports from
`better-auth/plugins` and `better-auth/client/plugins` are unchanged.

-
[#&#8203;11822](https://redirect.github.com/better-auth/better-auth/pull/11822)
[`414e845`](414e845f12)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- You can now import the Captcha and OpenAPI plugins from
`better-auth/plugins/captcha` and `better-auth/plugins/open-api`, as you
can for other plugins. Previously these imports failed with a "not
exported" error. Imports from `better-auth/plugins` are unchanged.

If your TypeScript config uses `"moduleResolution": "node"` (or
`node10`), `better-auth/plugins/multi-session` and `better-auth/test`
now resolve their types. Previously TypeScript reported that it could
not find their declarations. Projects using `bundler`, `node16`, or
`nodenext` resolution are unaffected.

- Updated dependencies
\[[`fedd055`](fedd05586c),
[`bbd0a19`](bbd0a19c30),
[`99cdfe7`](99cdfe7c2e)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.10
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.10
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.10
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.10
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.10
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.10
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.10

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

##### Patch Changes

-
[#&#8203;11766](https://redirect.github.com/better-auth/better-auth/pull/11766)
[`6edaa61`](6edaa61e62)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - An
`onAPIError.onError` handler that throws or rejects no longer fails the
request or causes an unhandled promise rejection. The error is logged
and the original error response is returned. Async handlers now finish
before the response is sent.

- Updated dependencies \[]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.9
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.9
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.9
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.9
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.9
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.9
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.9

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11565](https://redirect.github.com/better-auth/better-auth/pull/11565)
[`b1cfc1e`](b1cfc1ec1e)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Omit
non-returned custom fields from inferred output schema types.

-
[#&#8203;11540](https://redirect.github.com/better-auth/better-auth/pull/11540)
[`678c555`](678c555beb)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
cookie security attributes with RFC 6265bis.

-
[#&#8203;10591](https://redirect.github.com/better-auth/better-auth/pull/10591)
[`193efff`](193efff3d2)
Thanks [@&#8203;kdelay](https://redirect.github.com/kdelay)! - Expired
or revoked sessions now clear stale cookies when using `customSession`.

-
[#&#8203;11625](https://redirect.github.com/better-auth/better-auth/pull/11625)
[`369176e`](369176e7f6)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Fixed single-use checks for apps that set
`advanced.database.generateId: "uuid"`. Default id generation is
unaffected, and no migration is needed.

- On SQLite and MySQL, SAML sign-in, DPoP-bound requests checked against
the database replay store, `private_key_jwt` client authentication, and
magic link or email OTP sign-ins that adopt an unverified account failed
with a `NOT NULL` error on the `id` column. They now work. SIWE sign-in
ignored the `email` field and used the wallet-derived address; it now
uses the supplied email when no other account has it.
- On Postgres and MongoDB, a reused SAML assertion, DPoP proof, or
client assertion was accepted. Each one is now accepted only once.

With `generateId: "serial"`, behavior is unchanged: these checks need
string ids, and Better Auth now logs a warning the first time one of
these flows runs.

-
[#&#8203;11391](https://redirect.github.com/better-auth/better-auth/pull/11391)
[`352d04c`](352d04c8eb)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - Fix
`customSession` treating session lookup failures as signed-out users.
Server-side `getSession` now throws an API error, and HTTP clients
receive an error response.

-
[#&#8203;11750](https://redirect.github.com/better-auth/better-auth/pull/11750)
[`e9d9921`](e9d9921217)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Generic OAuth providers configured with `discoveryUrl` now recover
without a restart when discovery fails at startup. Since 1.7.3, a
provider whose discovery request failed at boot (for example, because
the identity provider was still starting) was skipped, and every sign-in
returned `PROVIDER_NOT_FOUND` until the app restarted. Better Auth now
retries discovery on the next sign-in, callback, or account-linking
request for that provider, and the provider works as soon as discovery
succeeds. While discovery keeps failing, sign-in and account linking
still return `PROVIDER_NOT_FOUND` and callbacks redirect with
`error=oauth_provider_not_found`, and each request may wait up to 10
seconds for the retry.

-
[#&#8203;11549](https://redirect.github.com/better-auth/better-auth/pull/11549)
[`1bd5c37`](1bd5c37884)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
`lastLoginMethod` failing sign-in when `cookieName` or `maxAge` is
explicitly `undefined`.

-
[#&#8203;11174](https://redirect.github.com/better-auth/better-auth/pull/11174)
[`766cfb3`](766cfb3f42)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! - Stop
double-decoding `callbackURL`, `newUserCallbackURL` and
`errorCallbackURL` on magic link verify so percent-encoded characters in
callback query params are preserved.

-
[#&#8203;11505](https://redirect.github.com/better-auth/better-auth/pull/11505)
[`c46992f`](c46992f6ce)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
Preserve the referenced model and field keys when generating Kysely
migrations, so custom table names that match another model key produce
the intended foreign keys.

-
[#&#8203;11718](https://redirect.github.com/better-auth/better-auth/pull/11718)
[`1d95ebf`](1d95ebf3fe)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
missing device sessions and failed automatic session switching after
cache eviction when `storeSessionInDatabase` is enabled and
`preserveSessionInDatabase` is disabled. Automatic switching now follows
the order of held sessions, and large lists or sessions whose users no
longer exist no longer cause valid sessions to disappear.

-
[#&#8203;10266](https://redirect.github.com/better-auth/better-auth/pull/10266)
[`c68b2cd`](c68b2cd8a5)
Thanks [@&#8203;shiminshen](https://redirect.github.com/shiminshen)! -
Projects that enable `exactOptionalPropertyTypes` can use the
`oauthProvider()` and `mcp()` plugins again. Since 1.7.0, adding either
plugin to `betterAuth()` failed to type-check with a TS2322 error.

-
[#&#8203;11637](https://redirect.github.com/better-auth/better-auth/pull/11637)
[`2627237`](2627237fae)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Projects using the organization plugin with `skipLibCheck: false` no
longer get `TS2536: Type '"role"' cannot be used to index type ...` from
`crud-members.d.mts`. The `role` returned by `getActiveMemberRole` is
now typed as the organization's role names directly. Projects with
`skipLibCheck: true` (the default in most templates) were unaffected.

-
[#&#8203;10866](https://redirect.github.com/better-auth/better-auth/pull/10866)
[`3d1f008`](3d1f008ae3)
Thanks [@&#8203;heliohm](https://redirect.github.com/heliohm)! - The
organization plugin no longer pulls every zod locale into server
bundles.

-
[#&#8203;11626](https://redirect.github.com/better-auth/better-auth/pull/11626)
[`67743ed`](67743ed6e8)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Password resets and password changes no longer keep the new password
when revoking the user's sessions fails. With
`revokeSessionsOnPasswordReset` or `revokeOtherSessions`, database
sessions are revoked and the password is saved in one transaction when
transactions are enabled for the adapter, so a failure leaves the old
password and sessions in place. Sessions in secondary storage are still
removed after commit, on a best-effort basis. This covers
`/reset-password`, the email OTP and phone number reset endpoints, and
`/change-password`. `onPasswordReset` now runs after sessions are
revoked, so a throwing callback no longer leaves them active, and a
callback that lists the user's sessions no longer sees the revoked ones.

-
[#&#8203;10698](https://redirect.github.com/better-auth/better-auth/pull/10698)
[`f0ce580`](f0ce580fbd)
Thanks
[@&#8203;jashkarangiya](https://redirect.github.com/jashkarangiya)! - If
you set the phone number plugin's `verifyOTP` option,
`/phone-number/reset-password` now checks the code with it, as
`/phone-number/verify` already does. Before, password reset always
compared the code with the one Better Auth generated, so apps that
verify codes through a provider such as Twilio Verify could not reset
passwords. If your `sendPasswordResetOTP` sends the code Better Auth
generates, make sure `verifyOTP` accepts that code. Apps that don't set
`verifyOTP` are unaffected.

-
[#&#8203;11646](https://redirect.github.com/better-auth/better-auth/pull/11646)
[`07a0938`](07a09389ef)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A failed password reset no longer spends the reset link or OTP.
`/reset-password`, `/email-otp/reset-password` and
`/phone-number/reset-password` now check the token or code without
consuming it, validate and hash the new password, then consume it in the
same transaction as the session revocation and password write. A
rejected password, such as one refused by `haveIBeenPwned`, always
leaves the link or OTP usable. A later failure, such as a failed session
revocation or password write, also leaves it usable when the adapter's
transactions are enabled and verification values are stored in the
database (the default without secondary storage, or
`verification.storeInDatabase: true`). Wrong codes still count against
the OTP attempt limit.

-
[#&#8203;11643](https://redirect.github.com/better-auth/better-auth/pull/11643)
[`92dfcea`](92dfceaa14)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A sign-up that fails after its session is created no longer leaves
that session in secondary storage. With `storeSessionInDatabase` enabled
and `preserveSessionInDatabase` off, the secondary-storage copy is
written only after the sign-up commits, and listing a user's sessions
now reads the database, so a session whose cached copy failed to write
is still listed and revoked. With other secondary-storage settings,
sign-up, passkey registration and SSO sign-in with `resolveUser` keep
the session write inside their transaction, so a storage failure rolls
back the new user, passkey or account instead of keeping them without a
session. A session revoked by a `session.create.after` database hook
also stays revoked.

-
[#&#8203;11488](https://redirect.github.com/better-auth/better-auth/pull/11488)
[`e15625f`](e15625ff38)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! -
SvelteKit 3 projects can now install Better Auth without
`--legacy-peer-deps`. The `@sveltejs/kit` peer range now includes
`^3.0.0`; SvelteKit 2 projects are unaffected.

- Updated dependencies
\[[`4175b34`](4175b34a8f),
[`435645e`](435645e5eb),
[`369176e`](369176e7f6),
[`0cfe07d`](0cfe07dccd),
[`9904b29`](9904b29ece),
[`e78f15a`](e78f15aa31),
[`60525e0`](60525e08fd),
[`8133265`](813326536c),
[`ea85d13`](ea85d133d6),
[`916ef5c`](916ef5c530),
[`1d95ebf`](1d95ebf3fe),
[`6214610`](62146108c7),
[`67743ed`](67743ed6e8),
[`c46d2a6`](c46d2a6ac4),
[`92dfcea`](92dfceaa14),
[`a9f455d`](a9f455d586),
[`9725f1b`](9725f1b361)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.8
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.8
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.8
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.8
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.8
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.8
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.8

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am every weekday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODYuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-28 19:24:36 +00:00
Marvin Frachet
e4d737bfe0
feat(playground-ui): make span details say what each span did (#28687)
The span details panel in Studio traces used to show raw input and
output first, so you had to dig through JSON to understand what a span
actually did. This reworks it so each span tells you up front.

Each nested span now opens with a one-sentence summary naming who did
what, e.g. "gpt-5-mini called weatherInfo, then wrote the answer",
"Observational Memory loaded 2 earlier messages from memory into the
conversation" or "Moderation left the system prompt and the conversation
unchanged", tinted by outcome. Memory, workspace, skill and processor
spans show exactly which messages they added or removed right inside
that summary (including processors that edit the system prompt directly,
which we now diff). Model spans list the tool calls they made in the
summary, each opening on its input and result with the same rows as the
chat. The root span skips the summary unless the run failed or was
stopped, since its input and output already say it all.

Every span now reads in the same order: changes, input, output, then
error, tools, metadata and attributes. Metadata and attributes are
folded by default as raw JSON. JSON views are no longer clipped behind
an Expand button and instead open with top-level values folded; outputs
with nothing to preview (like a step that only called tools) go straight
to JSON. Section actions (Preview, JSON, copy) appear on hover or focus.

Also adds `examples/agent/src/seed-history-traces.ts`, which clones
recorded traces across the last 60 days with realistic volume and some
failures, to populate the trace explorer and metrics locally.

Tested with Vitest + MSW (traces and chat suites pass), typecheck and
lint, and manually against real traces in Studio.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

The trace details panel now explains what each part of a run did, what
changed, and which tools were called. A new script can add sample trace
history from the past 60 days to local data.

## What changed

- Added outcome summaries for model, tool, agent, processor, and
streamed-output spans. Root spans show a summary only when a run fails
or stops.
- Added processor change details, including message mutations and
system-prompt changes. Processor facts, such as phase and tripwire
information, appear as labeled values.
- Separated model tool calls from the tools offered to the model. Tool
calls show their inputs and results in a read-only view.
- Updated span panels to show sections in this order: changes, input,
output, error, tools, metadata, and attributes. Metadata and attributes
open as folded JSON. JSON views fold top-level values.
- Added `examples/agent/src/seed-history-traces.ts` to clone trace data
with new IDs and shifted timestamps, then seed spans, metrics, scores,
and logs into DuckDB. The script defaults to 900 runs over 60 days and
adds a higher failure rate during a simulated incident window.
- Added and updated tests for outcome summaries, processor changes,
payload rendering, and tool-call display.
- Updated the Storybook build script to build `@mastra/ai-sdk` before
building Storybook.

## Validation

The PR objectives report passing Vitest and MSW trace and chat suites,
typecheck, lint, and manual checks against real Studio traces. These
results are author-reported; no test execution results were supplied.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 16:27:58 +01:00
shreyas-mastra
34983c9bbb
chore(security): Vanta 2026-10-23/26 - storybook 9.1.21, body-parser, fast-uri, multer, serialize-javascript, zod pins, esbuild/bundle-name overrides (#28325)
## Update 2026-10-26 afternoon (Vanta pass)
Added commit `f6e4b670` on top of the 16:20 ET main merge:
- **esbuild 0.18.20 → 0.25.12** (GHSA-67mh-4wv8-2f99) and **bundle-name
3.0.0 → 4.1.1** (AIKIDO-2026-886499): the 12:43 ET merge of main dropped
the two `pnpm-workspace.yaml` entries this PR added on 10-23
(`'@esbuild-kit/core-utils>esbuild': 0.25.12` and
`'default-browser@4.0.0>bundle-name': 4.1.1`), so both old versions were
back in `pnpm-lock.yaml`. This commit puts them back exactly as before.
No other overrides changed.
- Added the empty changeset
`.changeset/vanta-2026-10-26-afternoon-overrides.md`.
- `pnpm install --frozen-lockfile --lockfile-only` passes.

After this, `osv-scanner` on all 34 lockfiles finds only the documented
leftovers: zod 3.25.76, ai 4.3.19 / `@ai-sdk/provider-utils` 2.2.8 (the
v4 line), extract-zip 2.0.1 (no patch), `@opentelemetry/core` 1.30.1,
and `@azure/msal-node` 5.6.0 / 6.0.1.

---

## Update 2026-10-26 (Vanta pass)
Merged `origin/main` (no conflicts) and added commits `9b169f0f` and
`94e183ff`:

| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| body-parser | 2.3.0 → 2.4.0 | CVE-2026-111181 / GHSA-27r3-jxmh-p828
(High) | root `pnpm-lock.yaml`, `examples/agent`, refund and genui
templates (npm) | Raised the root floor `body-parser@<2.3.0: 2.3.0` →
`<2.4.0: 2.4.0`. Added a floor in `examples/agent`. `npm update` in the
templates. `patches/body-parser@2.3.0.patch` renamed to `@2.4.0` (same
one-line raw-body interop; it applies cleanly). |
| body-parser | 1.20.6 → 1.20.9 | same advisory, 1.x line | all 10
`e2e-tests/*` lockfiles (verdaccio → express 4) | New floor
`body-parser@<1.20.9: 1.20.9`. The `patches/body-parser@1.20.6.patch`
files are renamed to `@1.20.9` (they apply cleanly). |
| fast-uri | 3.1.8 → 3.1.9 | CVE-2026-110095/-110180/-110306/-110725 |
root, e2e-tests ×10, `examples/agent`, otel-bridge `agent-hub`,
`acp-validator`, `gh-issue-triage`, refund and genui templates | Raised
the existing floors/pins from 3.1.8 to 3.1.9 |
| fast-uri | 4.2.1 → 4.2.3 | GHSA-333x-w4r6-6crp, GHSA-w74x-v6f9-j3xg,
GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h | otel-bridge `agent-hub` |
Raised the existing floor `fast-uri@>=4.0.0 <4.1.5: 4.2.1` → `<4.2.3:
4.2.3` |
| multer | 2.4.0 → 2.5.0 | CVE-2026-113872 / GHSA-q7qp-rjg7-q26m (High)
| root | Floor `multer@<2.3.0: 2.4.0` → `multer@<2.5.0: 2.5.0` |
| serialize-javascript | 7.1.2 → 7.1.4 | CVE-2026-115897 /
GHSA-m5mm-p8h7-m29v | root | Floor `<7.0.5: ^7.0.5` → `<7.1.3: ^7.1.3` |
| zod | 4.3.6 / 4.4.3 / 4.5.4 → 4.6.7 | CVE-2023-54404 /
GHSA-mrhx-c7xc-m3w5 (High) | exact pins in
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage`,
`packages/mcp/integration-tests/{v2,published-v1}`,
`e2e-tests/commonjs/template` | Direct pin bump (same major) |
| fastify | `^5.12.5` → `^5.12.6` | CVE-2026-107832 | devDependency
specifiers in `server-adapters/fastify` and `workflows/inngest` (the
lock already had 5.12.6) | Specifier bump |

- Every new version is older than 24h: body-parser 2.4.0 and 1.20.9
(10-22), multer 2.5.0 (10-22), serialize-javascript 7.1.4 (10-23),
fast-uri 3.1.9 (10-19), fast-uri 4.2.3 (10-19), qs 6.16.1 (10-14, pulled
in by body-parser 2.4.0), zod 4.6.7 (10-12).
- No overrides or floors were removed; the existing ones were only
raised.
- `pnpm install --frozen-lockfile --lockfile-only` passes at the root
and in the nested e2e/example workspaces.
- Added the empty changesets
`.changeset/vanta-2026-10-26-security-floors.md` and
`.changeset/vanta-2026-10-26-fast-uri-4.md`.
- **Not changed:**
- zod 3.25.76: the fix exists only on zod 4, and the zod-v3 support and
compat tests intentionally stay on 3.
- `@azure/msal-node` 5.6.0: the fix is 7.1.0, but `@azure/identity` 4.14
pins `^6` and `@microsoft/teams.apps` 2.1.1 pins `^5.6.0`, so this would
be a two-major runtime jump.
- extract-zip 2.0.1: no patched release (the advisory lists `>=2.0.2`,
which has not been published).
- `@opentelemetry/core` 1.x: needs pubsub 6 / spanner 9, which are
majors.
  - ai v4 / provider-utils: the v4 line is vendored on purpose.

---

Refs mastra-ai/platform#2931

Vanta remediation, 2026-10-23 (follow-up to #28138, which has merged).

| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| storybook, @storybook/react-vite (+ react, builder-vite, csf-plugin,
react-dom-shim) | 9.1.20 → 9.1.21 | CVE-2026-114125 (Critical),
CVE-2026-114126 (High) | `client-sdks/react` devDependencies | Direct
bump `^9.1.20` → `^9.1.21` |
| esbuild | 0.18.20 → 0.25.12 | GHSA-67mh-4wv8-2f99 | better-auth →
drizzle-kit 0.31.10 → @esbuild-kit/esm-loader → @esbuild-kit/core-utils
(pins `~0.18.20`) | Override `'@esbuild-kit/core-utils>esbuild':
0.25.12` |
| bundle-name | 3.0.0 → 4.1.1 | AIKIDO-2026-886499 | @mastra/deepeval →
deepeval → open@9 → default-browser@4 (pins `^3`) | Override
`'default-browser@4.0.0>bundle-name': 4.1.1` |

### Why there is a `trustPolicyExclude` for storybook 9.1.21
`client-sdks/react` stays on the storybook 9 line; we are not doing the
storybook 10 major here. The only patched 9.x release is 9.1.21. It was
published on 2026-10-12 without the trusted-publisher evidence that
earlier 9.1.x releases had, so `trustPolicy: no-downgrade` fails with
`ERR_PNPM_TRUST_DOWNGRADE`. The exclude covers exactly the six packages
pnpm rejects, each pinned to `@9.1.21`: `@storybook/react-vite`,
`storybook`, `@storybook/react`, `@storybook/builder-vite`,
`@storybook/csf-plugin` and `@storybook/react-dom-shim`. No other
versions or packages are excluded. The packages come from the official
storybook monorepo release, 9.1.21 on the v9 line.

### Notes
- Every new version is older than 24h, so it satisfies
`minimumReleaseAge: 1440`. storybook 9.1.21 is 11 days old, esbuild
0.25.12 is from Nov 2025 and bundle-name 4.1.1 is from 2026-09-25.
- The esbuild override is dev-only: drizzle-kit is a CLI pulled in by
better-auth. I checked that `@esbuild-kit/core-utils` `transform()`
works against esbuild 0.25.12.
- bundle-name 4.x keeps the same `bundleName()` API. It is used only by
`open`'s macOS default-browser lookup.
- `pnpm build-storybook` in `client-sdks/react` fails on main too. The
error is a Babel 8 `loadPartialConfig` error, which happens with 9.1.20
as well, so it is not caused by this PR.
- I ran `pnpm install --frozen-lockfile` and it passes. The changeset is
empty because no published package changes.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR updates dependency versions and rules that keep older,
reported-vulnerable versions out of the project. It also updates
Storybook and records the changes in changesets.

## Summary

- Raises security-related dependency versions or minimums across the
root project, examples, templates, packages, and e2e workspaces. The
updates include `body-parser`, `fast-uri`, `multer`,
`serialize-javascript`, `zod`, and Fastify.
- Renames `body-parser` patch files and updates workspace references to
match the new versions.
- Updates Storybook packages in `client-sdks/react` from 9.1.20 to
9.1.21. Adds an `esbuild` override and updates the `bundle-name`
override.
- Adds changesets for the dependency updates. No tests were added.

## Validation

The author reports that frozen-lockfile installs pass at the root and in
nested e2e and example workspaces. The author also reports that `pnpm
build-storybook` fails on `main` as well as this branch, with a Babel 8
`loadPartialConfig` error.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-26 16:39:13 -04:00
shreyas-mastra
be82e8d1b5
security: Vanta remediation (2026-10-22 → 2026-10-23: storybook, vitest 4.1.12, toml 5.0.1, fastify, ip-address) (#28138) 2026-10-23 11:44:17 -04:00
Dane - AI (Mastra)
2f485b2d56
chore(deps): update security updates [security] (#28222) 2026-10-22 21:58:08 -04:00
Dane - AI (Mastra)
82e82fb5a7
chore(deps): update security updates [security] (#27869)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 14:54:47 +02:00
Marvin Frachet
7c86dc176d
feat(react,playground-ui): live-update the traces list with delta polling (#27967)
## Description

Auto-refresh in the traces explorer reloaded page 0 every 10 s. That
reset the keyset cursor chain, so pages you'd scrolled to were dropped
on every tick.

When the server reports the `deltaPolling` capability, the explorer now
polls `queryTraces({ mode: 'delta' })` and merges new or updated traces
into the list it already has. Loaded pages and scroll position survive
refreshes, and the infinite query only paginates. Without the
capability, nothing changes.

In `@mastra/react` this adds `useTraceQueryLatest`, which you render
next to `useTraceQuery` with the same `query` and `limit`:

```tsx
const { enabled: live } = useTraceQueryDeltaPollingAvailable();
const list = useTraceQuery({ query, limit });
useTraceQueryLatest({ query, limit, enabled: live, refetchInterval: 10_000 });
```

It bootstraps a cursor, drains `hasMore` in one poll, re-bootstraps on
409, and stops polling on 4xx/501. Merges keep the server's keyset order
and upsert by `traceId`. A trace that sorts past the last loaded row is
left to pagination while more pages remain. The cursor key leaves out
`orderBy`, so re-sorting keeps the cursor. `mergeTraceQueryDelta` and
`traceQueryKey` are exported too.

In the playground, delta polls need the exact same time range on every
poll. So a rolling window reaches 24 h ahead, and re-anchors when
filters or dates change. A tab left open past that horizon with no
filter change stops picking up new traces until a refresh.

Known gap: the cursor bootstrap runs in parallel with the first page, so
a trace that completes in the few milliseconds between the two can be
missed until a manual refresh. Bootstrapping before the first page would
close it; happy to do that here or in a follow-up.

## Related issue(s)

None yet.

## Type of change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [ ] I have linked the related issue(s) in the description above
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

The traces list can now show new or changed traces without reloading
everything. It keeps loaded pages, pagination, and scroll position.

## What changed

- Added delta polling to `@mastra/react`.
- Added `useTraceQueryLatest`, `useTraceQueryDeltaPollingAvailable`,
`traceQueryKey`, and `mergeTraceQueryDelta`.
- Added cursor bootstrapping, batch draining, 409 recovery, retry
handling, and permanent-error handling.
- Updated the playground traces explorer to use delta polling when
supported.
- Preserved full-list refresh behavior when delta polling is
unavailable.
- Added stable time anchors for rolling and fixed trace filters.
- Set delta polling to 30 seconds.
- Re-sorted updated traces when their sort value changes.
- Added tests for capabilities, merging, polling, pagination, filtering,
sorting, and fallback behavior.
- Added a trace-seeding example and updated test fixtures.

## Known limitations

- A trace can be missed if it completes between cursor bootstrapping and
the first page request. A manual refresh is required.
- Rolling delta polling can stop finding new traces after the 24-hour
horizon. Refresh the tab to reset the window.

## Validation

Tests were added, but no test command or result was provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-21 12:53:03 +02:00
Dane - AI (Mastra)
4f60903242
chore(deps): lock file maintenance (#27013) 2026-10-21 09:25:38 +02:00
Daniel Lew
ca29333f8a
MCP Events: client/server interop tests, example, and guide (#27331)
Fixes #27278

## Summary

This closes out MCP Events support
([SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415),
a draft extension) in `@mastra/mcp`. It adds no runtime code. It proves
the client and server work together, gives users a runnable example, and
adds a guide.

- **Interop tests** (`packages/mcp/src/__tests__/events-interop/`): a
real `MCPClient` against a real `MCPServer` over stdio and Streamable
HTTP, running the same scenarios on both transports:
  - discovery;
  - push routing across two concurrent subscriptions;
  - poll from the emit buffer;
  - poll from a `poll()` source;
- argument, unknown-event and forced-mode errors (asserting the wrapped
`cause.id`);
- cursor resume for all three sources (no missed or duplicate
occurrences);
  - `reconnectServer()` during a push subscription;
- a server without events, which rejects with `MCP_EVENTS_NOT_SUPPORTED`
and receives no `events/*` request. Over stdio this is proven by
recording stdin, with a positive control. Over HTTP it is proven by
recording request bodies. Neither needs a source change.

Occurrences are always caused after the subscription is established (by
a tool call or a direct emit), never by a timer.
- **Webhook interop tests** (`webhook-interop.test.ts`): a real client
against a real server over authenticated Streamable HTTP, with a local
receiver that mounts `mcp.events.handleWebhook()`. The URL policy is
relaxed in the test fixture only. Covered:
  - mode selection (webhook preferred when configured, push otherwise);
  - routing and `match` filtering for two subscriptions sharing one URL;
- cursor resume after the unsubscribe lands, and a resubscribe while
it's in flight;
  - refresh before expiry, with `deliveryStatus`;
  - forced-mode, missing-config and unauthenticated errors;
- same-argument subscriptions sharing one server subscription: both
receive, cancelling one leaves the other receiving, and only the last
cancel unsubscribes;
- fallback to `push` with `MCP_EVENTS_WEBHOOK_UNAVAILABLE` over stdio
and unauthenticated HTTP when no mode is forced. Forced `webhook` still
rejects.
- **Example** (`examples/mcp-events/`): a stdio server emits
`ticket.created` from a tool. The client subscribes with `{ project:
'web' }`, opens tickets, and runs a triage agent once per matching
occurrence.
- **Guide** (`/docs/guides/mcp-events`, sidebar entry under Guides):
covers concepts, `emit()` vs. `poll` sources, subscribing, cursor
resume, error handling, webhook delivery, starting agent and workflow
runs per occurrence, and limits. The Events sections of the `MCPClient`
and `MCPServer` reference pages link to it.
- The guide links to `MCPEventsSignalProvider` at
`/reference/tools/mcp-client#events-in-agents-and-workflows-experimental`.
That anchor is added by #27330.
- Until #27330 merges (it merges before this PR), `pnpm build` warns
about it as a broken anchor. The build still passes.

No changeset: nothing published changes.

## Stack

Merge order: #27320 → #27326, #27324 → #27330 → #27333 → this PR.

- #27320: shared events wire contract
- #27326: client (`mcp.events.list` / `subscribe`, poll + push)
- #27324: server (`defineEvent`, `server.events.emit`, poll + push)
- #27333: webhook delivery (server and client)
- #27330: agent signals provider

This PR targets `daniel/27278-events-webhook` (#27333).

## Run the interop suite

`test:client` only globs `./src/client` and `test:server` only
`./src/server`, so neither runs this suite. Run it directly:

```bash
cd packages/mcp && pnpm vitest run --project unit:packages/mcp src/__tests__/events-interop
```

## Test plan

- `cd packages/mcp && pnpm vitest run --project unit:packages/mcp
src/__tests__/events-interop`: 34/34 passed (24 poll/push on both
transports, 10 webhook), 3 runs in a row. This suite isn't covered by
`test:client`, which only globs `./src/client`.
- Mutation checks:
  - making `match` always true fails the push and buffer-poll tests;
  - dropping the resume cursor fails all 6 resume cases.
- Webhook: making `match` always true fails the routing test. Dropping
the resume cursor fails the resume test. Dropping the short TTL/refresh
margin times out the refresh test.
- `pnpm --filter ./packages/mcp test:client`: 472 passed; `test:server`:
198 passed
- `pnpm --filter ./packages/mcp build:lib`, `npx tsc --noEmit -p
packages/mcp`, a typecheck of the test files, and oxlint + eslint on the
interop directory: all clean.
- Example: `pnpm install --ignore-workspace && pnpm typecheck` is clean.
A smoke run with a fake key reached the model call after listing,
subscribing and receiving.
- Docs: `format:check`, `lint:remark` and Vale on the guide are clean.
`pnpm build` succeeds; its only broken-anchor warnings are the existing
agent-controller ones and the #27330 anchor above. `pnpm validate` fails
only on stale `new` sidebar tags that were already there.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR shows that MCP Events work between clients and servers. It adds
tests, a runnable ticket example, and documentation for using the
feature.

## What changed

- Added interop tests for stdio and Streamable HTTP.
- Covered discovery, push and poll delivery, filtering, cursors,
reconnection, errors, and unsupported servers.
- Added authenticated webhook tests for routing, filtering, cursor
resume, refresh, shared subscriptions, and fallback behavior.
- Added an `mcp-events` example that connects ticket events to an agent.
- Added an MCP Events guide covering subscriptions, delivery modes,
authorization, cursors, buffering, limits, and agent or workflow runs.
- Linked the guide from the MCP client and server references.
- Added guidance for cursor persistence, buffer overflow, and `match`
versus `authorize`.
- Added an empty changeset because the PR does not require a package
release.
- Added no runtime implementation changes.

## Validation

- The author reports that the interop suite passed 34/34 tests in three
runs.
- The author reports clean package tests, type checks, linting, example
checks, and documentation checks.
- `pnpm validate` reportedly still fails on pre-existing stale `new`
sidebar tags.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-20 20:47:42 -04:00
shreyas-mastra
f3cf77305f
security: Vanta remediation (2026-10-20) (#27828) 2026-10-20 08:39:07 -07:00
shreyas-mastra
fa409d430b
security: Vanta remediation pass 2026-10-14/15/19 (zod 4.6.7, @ai-sdk/provider-utils, @copilotkit template) (#27023) 2026-10-19 11:32:32 -07:00
shreyas-mastra
7aec8b0d95
security: Vanta remediation pass 2026-10-12 (better-auth, MCP SDK) (#26773)
## Summary
Vanta remediation for 2026-10-12. Target list is today's live export (77
findings, 44 unique IDs). Platform findings are handled in
mastra-ai/platform#3317.

### What changed
| Package | From → To | Findings | Where | How |
|---|---|---|---|---|
| better-auth | 1.7.5 → 1.7.7 | AIKIDO-2026-373183 (Critical) | root +
`examples/agent` | raise override `better-auth: ^1.7.7`; direct dep
`@mastra/auth-better-auth` ^1.7.7 |
| @better-auth/drizzle-adapter | 1.7.5 → 1.7.7 | AIKIDO-2026-261025
(Low) | root + `examples/agent` | floor
`'@better-auth/drizzle-adapter@<1.7.7': 1.7.7` (also pulled by
better-auth 1.7.7) |
| @modelcontextprotocol/sdk | 1.31.0 → 1.32.1 | AIKIDO-2026-365378
(High), -156139, -344432 | root, nested locks, `scripts/gh-issue-triage`
| raise floor to `<1.32.0 → 1.32.1`; bump direct pins/ranges |

Nested `pnpm-workspace.yaml` floors raised in e2e-tests/*, examples/*,
integration-tests, etc., and those lockfiles regenerated. Versions used
were published >24h ago (minimumReleaseAge). Patch changeset included
for published packages whose dependency ranges changed.

Aikido lens on this branch: better-auth and MCP SDK findings are gone.
OSV: handlebars already clear on main; remaining high are
braces/extract-zip (no patch).

### Left as-is (no patch, or major-only)
- extract-zip ≤2.0.1: no fix (overdue; removed by #25855 when that
lands). Needs Vanta risk acceptance.
- braces 3.0.3, sprintf-js 1.0.3/1.1.3: no patched release
- postcss-selector-parser 6.x: @tailwindcss/typography pins 6.0.10
- katex 0.16: mermaid declares ^0.16.47
- @ag-ui/client 0.0.59: fix only in 1.0.0 (major). Parent
`@copilotkit/channels-*` 0.11.0 pins 0.0.59 exactly
(template-genui-data-explorer)
- @hono/node-server 1.19 (fix 2.1.3), undici 6.29 (fix 7.23/8.10),
raw-body 3 in templates (fix 4), bundle-name 3 (fix 4.1.1), got 15 (fix
16), zod 3.25 (fix 4.x), @bufbuild/protobuf 1.10 (fix 2.x), openai 6.49
(fix 7.x), jose 5.10 via @segment/analytics-node in template (fix 6.x),
@ai-sdk/provider-utils 2.2.8 / 3.0.x Aikido ranges wanting 4.0.18+:
major-only or scanner range noise

Do not merge unless reviewed. No CI weakened.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5

This PR updates shared dependency versions so the project uses newer
releases of Better Auth and the MCP SDK. It also updates workspace rules
to keep older versions from being selected.

## Changes

- Updated Better Auth requirements and workspace overrides to `^1.7.7`.
- Updated `@modelcontextprotocol/sdk` requirements and overrides to
`1.32.1` across affected packages and workspaces.
- Added overrides for older `@better-auth/drizzle-adapter` versions to
use `1.7.7`.
- Added a patch changeset for `@mastra/auth-better-auth`,
`@mastra/mcp-registry-registry`, and `@mastra/playground-ui`.

Test results and review findings were not provided.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-13 07:41:26 -07:00
shreyas-mastra
ea7ca755a4
security: Vanta remediation pass 2026-10-07 (MCP SDK, sharp, hono) (#26260) 2026-10-07 09:29:07 -07:00
Michael 'Misha' Nightingale
84143a892e
feat(livekit)!: prepare 0.5.0 with recording and speech metrics (#24674)
Prepare the LiveKit 0.5.0 release with opt-in call recording and Studio
playback. `dispatchVoiceSession()` and `liveKitConnectionRoute()` can
create a fresh room with LiveKit auto egress before dispatching the
agent. The recording route resolves an authorized trace to a short-lived
playback URL, and Studio exposes it through **Review Audio**.

```ts
await dispatchVoiceSession({
  roomName: `call-${crypto.randomUUID()}`,
  metadata: { agentId: 'support' },
  recording, // Server-side LiveKit output settings.
});
```

Recording review requires an explicit `authorize({ traceId, context })`
callback. Only `true` permits trace lookup and playback URL resolution;
missing policies fail at registration. Recording room conflicts return
HTTP 409. The example and documentation cover S3 configuration, scoped
permissions, consent, and recording lifecycle implications. Browser
recording creation and playback in the unauthenticated example require
an explicit local-demo opt-in and are disabled in production.

The browser-safe `@mastra/livekit/client` entry point provides
`getLiveKitRecording(client, traceId)`, preserving the client's
authentication and request configuration. Studio uses the supported
React hook subpaths from main.

The integration also adds common per-turn metrics, speech-flush
boundaries, and an `onSpeechComplete` hook. `onTurnComplete` retains its
generation-only behavior. Custom reply-generator consumers must handle
flush boundaries, and `MastraLLM` integrations should use
`mastraLLMNode`. Playback completion describes server delivery, not
proof that the listener heard the audio.

The VAD opt-out is fixed. LiveKit Agents 1.7.1 is the supported minimum
and migration target, with matching plugin peer ranges and upgrade
instructions. The planned stable release remains **0.5.0**.

### Validation

- All 280 LiveKit tests across 22 files passed.
- All 18 Studio voice and recording-review tests passed.
- A local synthetic probe passed 96 example route-policy cases covering
room creation, dispatch, unrecorded tokens, storage access, and denied
playback.
- LiveKit, React SDK, shared Studio UI, and production Studio builds
passed.
- LiveKit, Studio, and voice-agent example typechecks passed; focused
lint and documentation checks passed.
- Production bundle inspection confirmed that the recording client adds
no LiveKit server or worker modules to the browser bundle.
- Changeset planning retains the 0.5.0 release target.

The core working-memory configuration fix and its regression tests are
in #26090 for separate review.
2026-10-06 14:38:25 -07:00
shreyas-mastra
bf0dd07091
security: Vanta remediation pass 2026-10-05 (#25966)
Update 2026-10-06 (commits added on this branch; origin/main merged in
to clear the lockfile conflict)

Dependabot opened new alerts overnight (4 critical). This pass adds:
- braintrust ^3.24.0 -> ^3.36.0 in @mastra/braintrust. braintrust 3.27
pulled in simple-git 3.36.0, which has critical and high advisories
(GHSA-x6jw-m9v5-85vh, GHSA-v5rq-49vh-5v5c via @simple-git/argv-parser
1.1.1, GHSA-858h-whjf-mvg5, GHSA-g4wm-2vf7-vfgr). Those are only fixed
in simple-git 4. braintrust 3.36 no longer depends on simple-git, so
simple-git drops out of the lockfile. @mastra/braintrust only uses
initLogger and currentSpan.
- wrangler ^4.110.0 -> ^4.147.0 (devDependency of
@mastra/deployer-cloudflare, type-only import). This moves workerd
1.20260708.1 -> 1.20261001.1 on that chain (Aikido medium). workerd
1.20260714.1 is still there through the miniflare 4 devDependency in
stores/cloudflare and stores/cloudflare-d1.
- source-map-js 1.2.1 -> 1.2.2 (GHSA-68fv-2mgg-jv7q, high). Added the
floor `source-map-js@>=1.0.0 <1.2.2: 1.2.2` in the root and in 15 nested
pnpm workspaces (9 e2e projects, mastracode/web, otel-bridge agent-hub
and hono-multi, agent-builder, mcp and memory integration-tests).
postcss, css-tree, magicast and @tailwindcss/node all declare ^1.2.x. In
the customer-refund template, a plain npm lock refresh was enough (no
override).
- postcss-selector-parser: raised the existing floor from `>=7.1.0
<7.1.3: 7.1.3` to `>=7.1.0 <7.1.6: 7.1.6` (GHSA-rj75-hqrm-r3gf, medium).
- observability/_examples/otel-bridge/hono-multi: tsx catalog ^4.21.0 ->
^4.23.15. tsx 4.23 uses esbuild ~0.28, so esbuild 0.27.2 is gone (Aikido
high and low, fixed in 0.28.1).
- Changeset `.changeset/vanta-2026-10-06.md`: patch for
@mastra/braintrust.

Still not fixed (as of 2026-10-06)
- sprintf-js 1.0.3/1.1.3 (GHSA-hp3w-g68c-fv3c): no patched release.
- postcss-selector-parser 6.0.10/6.1.3: the fix is only in 7.1.6.
@tailwindcss/typography 0.5.20 pins 6.0.10 exactly, and cssnano
6/postcss-calc 9 use ^6.
- katex 0.16.47 (GHSA-238p-pmpm-9mq7, low): the fix is in 0.18.2.
mermaid 12.1.0 still declares ^0.16.47.
- http-cache-semantics: 4.3.0 is now older than 24h, but it still
doesn't touch the max-stale path, and the advisory still lists no
patched version.
- braces 3.0.3 has no new release.
- The rest of the deferred list below is unchanged.

---

Vanta remediation for 2026-10-05. The finding list was rebuilt from
GitHub Dependabot, OSV-scanner on every tracked lockfile, and Aikido
intel (full intel.aikido.dev feed re-pulled today). It is not a Vanta
export.

What changed

Package bumps
- probe-image-size ^7.2.3 -> ^7.4.0 in @mastra/memory
(GHSA-gjj5-9665-rwrc, high).
- verdaccio ^6.10.4 -> ^6.10.5 in the 9 e2e projects. That moves
@verdaccio/core to 8.3.2 and js-yaml 5.2.2 -> 5.4.1
(GHSA-r3ph-w7gj-g6xm, medium).
- smol-toml 1.8.0 -> 1.9.0 pin in @mastra/code-sdk.

Root lockfile refresh (no range changes)
- serialize-javascript 7.0.5 -> 7.1.2, shell-quote 1.10.0 -> 1.12.0, ws
7.5.11 -> 7.5.13, enhanced-resolve -> 5.26.0, fs-extra 11.3.5 -> 11.4.1,
@sinclair/typebox 0.27.8 -> 0.27.12, @zip.js/zip.js 2.8.26 -> 2.23.0,
memfs/@jsonjoy.com/fs-snapshot 4.57.2 -> 4.80.0, @vue/* 3.5.38 ->
3.5.43.

pnpm overrides, for parents that pin an exact vulnerable version. All
stay in the same major.
- modern-tar 0.7.7 (just-bash), smol-toml 1.9.0 (just-bash,
@blaxel/core, @react-grab/cli, modal), strnum 2.4.2 (fast-xml-parser
5.10.1), inline-style-parser 0.2.9 (style-to-object 1.0.11),
`@opentelemetry/configuration>yaml` 2.9.1 (sdk-node 0.221).

Nested lockfiles
- shell-quote floor raised from <1.10.0 to <1.11.0 in examples/agent,
examples/voice-agent and otel-bridge/agent-hub.
- yaml 2.9.0 -> 2.9.1 in e2e-tests/pkg-outputs, examples/durable-agents,
mastracode/web, packages/mcp/integration-tests and the customer-refund
template.
- next 16.3.6 -> 16.3.8 in packages/memory/integration-tests.
- customer-refund template: tinypool 2.1.0 -> 2.1.2 through an override
scoped to oxfmt. oxfmt 0.59 pins it exactly, and bumping oxfmt would
change the template's format check.

Not fixed here
- braces 3.0.3 (GHSA-vfj7-8cjw-p6xm) and http-cache-semantics 4.2.0
(GHSA-ch52-4w7c-c8xp): no patched release. http-cache-semantics 4.3.0 is
outside the advisory range, but it doesn't change the max-stale code
path, so bumping to it would only hide the alert.
- extract-zip 2.0.1: no patched release. It comes from the webdriverio
chain that #25855 removes.
- workerd 1.20260708/1.20260714 (Aikido medium): miniflare 4.x stops at
workerd 1.20260730. The fix needs miniflare 5, which is only published
as an alpha.
- Major-only: @ai-sdk/provider-utils 2.2.8 / ai 4.3.19 (AI SDK v4),
@opentelemetry/core 1.30.1, esbuild 0.18/0.25/0.27.0 (convex pins 0.27.0
exactly), js-yaml 3, brace-expansion 1/2, uuid 11, zod 3, pino 8/9,
undici 6, plus other Aikido lows.
- websocket-driver 0.7.5: Aikido says the fix is 0.8.x, but no 0.8 is
published on npm.

The changeset is a patch for @mastra/memory and @mastra/code-sdk.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This PR updates several dependencies that have security fixes. It also
adds version rules so nested projects use safer versions of related
packages.

## Changes

- Updates `probe-image-size` in `@mastra/memory` to `^7.4.0` and pins
`smol-toml` in `@mastra/code-sdk` to `1.9.0`.
- Updates Verdaccio to `^6.10.5` in nine end-to-end test projects.
- Raises `shell-quote` overrides to `1.11.0` and adds overrides for
transitive dependencies, including `yaml`, `source-map-js`,
`postcss-selector-parser`, `modern-tar`, `smol-toml`, `strnum`,
`inline-style-parser`, and `tinypool`.
- Updates `braintrust` to `^3.36.0`, `wrangler` to `^4.147.0`, and `tsx`
to `^4.23.15`.
- Adds patch changesets for `@mastra/memory`, `@mastra/code-sdk`, and
`@mastra/braintrust`. The changesets report no API changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-06 10:35:09 -04:00
shreyas-mastra
4358322b7b
chore(deps): override upstream-blocked vulnerable transitive deps (#25853) 2026-10-02 18:03:50 -07:00
Marvin Frachet
a12f927ace
feat(playground): workspace page rebuilt around a WorkspaceTreeView file browser (#25700)
## Summary
Replaces the Studio workspace page (file browser grid + Skills tab +
separate skill detail page) with a single `WorkspaceTreeView` component
from `@mastra/playground-ui`.

**`WorkspaceTreeView` (playground-ui)**
- Lazily loaded folder tree (DS `Tree`) with nested folder creation,
delete, read-only paths, mount badges (provider icon, read-only lock,
error alert), and auto-expansion to the active file.
- Combined file + skill search (BM25/vector picked by the server).
- File viewer: Markdown (YAML frontmatter shown as a code block),
highlighted code, images, videos; overridable via `renderPreview`.
- Controlled `activeFilePath` / `onActiveFileChange`; optional
`addSkill` opens the skills.sh browser (dialog moved from playground).
- Error notices by cause (401/403/404/501), empty state with "New
folder" / "Add skill".

**Workspace page (playground)**
- One tree view instead of tabs; workspace selector moved to the header.
- Old skill URLs redirect to the skill's `SKILL.md` in the viewer.
- Page-level notices: `workspace.init()` required, and skills installed
in `.agents/skills` but not discovered.
- Update-all / remove skill wired through the tree.
- Removed the now-unused FileBrowser, SkillsTable, SkillDetail, search
panels and their hooks.

**Shared fixes**
- `PanelGroup` no longer animates from provisional sizes on first
render.
- `Tree.FolderContent` uses the fill animation so lazily loaded folders
don't jump.

## Known gaps vs main
- No tree sorting; `?path=` param not handled; large Markdown files with
many code blocks still block the main thread while Shiki highlights
(same as main).

## Test plan
- [x] `pnpm --filter ./packages/playground-ui` vitest: workspace, Tree,
resize (84 tests)
- [x] `pnpm --filter ./packages/playground` vitest: workspace domain +
page
- [x] typecheck + eslint clean in both packages
- [x] Manual in Studio against `examples/agent`: browse, open nested
file via URL, search, create/delete folder, install a skill from
skills.sh, notices (via intercepted responses), mobile/tablet/desktop


## Screenshots (Studio on :4111, `examples/agent`)

**Skill opened from URL** — parents auto-expanded, frontmatter shown as
YAML, "1 Skill" count
![skill
file](4f4365588f/1-skill-file.png)

**Tree search** (files + skills)

![search](4f4365588f/2-search.png)

**Filesystem-only workspace**
![fs
workspace](4f4365588f/3-fs-workspace.png)

**Add skill dialog** (skills.sh, installed badge)
![add
skill](4f4365588f/4-add-skill.png)

<details><summary>Tablet / mobile</summary>


![tablet](4f4365588f/5-tablet.png)

![mobile](4f4365588f/6-mobile.png)
</details>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

The workspace page now shows files and skills in one place. People can
browse folders, search for files and skills, and preview files without
switching between separate pages.

## What changed

- Replaced the workspace file browser and Skills tab with
`WorkspaceTreeView` from `@mastra/playground-ui`.
- Added lazy folder loading, nested folder creation and deletion,
read-only indicators, mount badges, combined file and skill search, and
Markdown, code, image, and video previews.
- Moved workspace selection to the page header. Added notices for
workspace initialization and installed skills that were not discovered.
- Redirected old skill URLs to the skill’s `SKILL.md` in the file
viewer.
- Gated write actions, deletion, and search on resolved permissions and
workspace read-only status.
- Added skills.sh registry methods to the client SDK for searching,
browsing, previewing, installing, removing, and updating skills.
- Removed the replaced file browser, search, skills-table, and
skill-detail UI and related hooks.
- Updated initial `PanelGroup` sizing and lazy folder-content animation.
- Added sample skills to the agent example workspace.

## Validation

The author reports 84 `playground-ui` tests and `playground`
workspace-domain and page tests. The author also reports typecheck and
ESLint checks for both packages, plus manual checks in `examples/agent`
on mobile, tablet, and desktop.

## Known gaps

- The tree does not support sorting.
- The page does not handle the `?path=` parameter.
- Large Markdown files with many code blocks can block the main thread
during Shiki highlighting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-02 11:36:08 +02:00
Marvin Frachet
e6395de28a
fix(playground-ui): render system prompts as markdown and collapse long span payloads (#25571)
## Summary
- **System prompts as markdown:** in trace previews (`AGENT_RUN`,
`MODEL_STEP`, `MODEL_INFERENCE`, `MODEL_GENERATION` inputs), system
messages showed raw markdown (`#`, `**`, `-`). They now go through the
markdown renderer like other roles. The common indentation is removed
first, so indented prompts don't turn into code blocks.
- **Collapsible payload boxes:** every span Input/Output box, in both
Preview and JSON, collapses past 220px with a bottom fade. An
Expand/Collapse button sits in the section header. The fixed
`max-h-[30vh]` inner scroll on JSON blocks is removed.
- **Shared `CollapsibleBox` + `useCollapsibleBox`** (new DS component):
the box measures its content, clips it and fades the bottom. The hook
holds the state, so each consumer places its own expand button. `Plan`
(submit_plan card) and span payload sections both use it.

## Test plan
- [x] Tests for `CollapsibleBox` (fits, overflows, external toggle,
custom height), `Plan` and span payloads pass
- [x] Storybook story `Elements/CollapsibleBox` renders with the clipped
fade and the Expand button
- [x] `pnpm --filter ./packages/playground-ui typecheck` and lint
- [ ] Manual: open a trace of an agent with markdown instructions. In
Input › Preview, headings, bold and lists are formatted, and long boxes
collapse and expand in both Preview and JSON

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

The Playground now shows system prompts with readable Markdown
formatting. Long trace payloads start in a compact view, with a control
to expand or collapse them.

## Changes

- Dedent message text and render it as Markdown in trace previews.
- Add shared `CollapsibleBox` and `useCollapsibleBox` APIs. Use them for
span payloads and the `Plan` component.
- Collapse span input and output at 220px. Show a bottom fade and an
Expand/Collapse button when content is clipped or expanded.
- Remove the 30vh scroll limit from JSON payloads.
- Add tests for Markdown message rendering and collapsible content.

## Validation

The PR objectives report passing tests for `CollapsibleBox`, `Plan`, and
span payloads, the `Elements/CollapsibleBox` Storybook story, typecheck,
and lint. Manual verification is unchecked.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-30 13:02:07 +02:00
shreyas-mastra
aeddbc9909
security: Vanta 2026-09-28 residuals (template proxy-addr, nested undici/next/shell-quote/form-data, OTEL, onnxruntime) (#25344) 2026-09-28 10:45:13 -07:00
Alex Booker
add92e61b5
docs: clarify memory eval approach choices (#25105)
The memory-evals approach table and linked example steer stored-dataset
runs toward an inline task, even though registered agents already get a
fresh thread per item and retry by default. Add the registered-agent
option and align the example README and script comments with that
behavior. Keep the inline-task example for explicitly selecting each
item’s thread and resource.

Addresses the [CodeRabbit finding on
#25092](https://github.com/mastra-ai/mastra/pull/25092#discussion_r4102227205),
which merged before the review fix was applied, and the [follow-up
example
finding](https://github.com/mastra-ai/mastra/pull/25105#discussion_r4103680933).
Checked the executor and existing memory tests for thread and retry
behavior, and verified the link to the memory-enabled targets section.
Focused formatting, Remark, and `git diff --check` pass.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This update helps readers choose how memory works when they evaluate
agents with stored datasets. Registered agents use a new thread for each
item by default, while an inline task lets readers choose each item’s
thread.

## Summary

- Replaced the overview of memory-evaluation patterns with a link to
runnable examples and an approach table.
- Added a table entry for registered agents in stored-dataset
experiments, with a link to the memory-enabled targets documentation.
- Clarified that an inline task supports explicit thread selection for
each dataset item.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-28 13:31:19 +01:00
shreyas-mastra
7b777d38d9
security: Vanta zero pass 2026-09-23 (grpc/compression/provider-utils floors) (#24848) 2026-09-23 13:58:39 -07:00
Marvin Frachet
adce402cd1
feat(playground): redesign the /new empty-state landing (#24809)
https://github.com/user-attachments/assets/2a9dc6b6-b8c3-4dd7-b79b-b8de48dec4ff



## Summary

Before the first message, the agent chat page now reads as a landing
rather than an empty chat:

- **Greeting**: agent avatar (initial) above "What can **<agent name>**
do for you today?", with the name as the only high-contrast part.
- **Composer centered** under the greeting, and the **suggested prompts
as a plain list** below it (ghost buttons, no cards). Prompt cap bumped
3 → 6; the chef example agent ships 6.
- **Threads panel hidden** on `/new` when the agent has no threads yet;
it appears after the first message.
- **Landing-shaped skeleton** while the agent loads, so `/new` resolves
in place instead of jumping from a docked-chat skeleton.
- **Model picker skeleton** in the composer while providers load, so the
action row no longer collapses/flashes.
- **View transition** when leaving the landing after the first send: the
composer glides to the dock. Only fires for a send (chat running);
history loads on refresh / thread switch snap as before. Respects
`prefers-reduced-motion`.

## Test plan

- [x] `pnpm --filter ./packages/playground test` — new MSW coverage for
landing (panel hidden, greeting, skeleton gating), model-picker
skeleton, prompt stagger; typecheck + lint clean
- [x] Manually verified on `examples/agent` (chef agent) at 390 / 820 /
1440 px, reduced-motion, and the first-send transition
- [ ] Reviewer: refresh an existing thread and switch threads — composer
must not slide

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

The `/new` page now gives users a clearer starting point before their
first message. It shows an agent greeting, a message box, and suggested
questions, with the threads panel adjusted to the agent’s available
conversations.

## Changes

- Redesigned the empty-thread landing with a centered composer and up to
six suggested prompts in a vertical list.
- Updated threads panel behavior for agents with and without memory. For
agents with memory, the panel collapses on a threadless landing and
reopens when a thread exists.
- Added a landing-page loading skeleton and a composer skeleton while
model providers load.
- Added a first-send view transition and greeting and prompt animations.
Reduced-motion preferences disable these animations.
- Added and updated tests for landing states, suggested prompts, and the
loading model picker.

Test execution results were not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-23 14:58:15 +02:00
shreyas-mastra
6c82d74c13
security: scrub nested proxy-addr@2.0.7 + floor @fastify/proxy-addr 5.1.1 (Vanta zero) (#24597)
## Summary
- Scrub **all** nested `pnpm-lock.yaml` files that still pinned
`proxy-addr@2.0.7` (e2e + examples), via nested `pnpm-workspace.yaml` /
`package.json` overrides + lock regenerate.
- Floor **`@fastify/proxy-addr@<=5.1.0 → 5.1.1`** (AIKIDO-2026-296561 /
CVE-2026-92395) in root + nested otel-bridge examples.
- Expand Vanta/Aikido floors (overrides allowed): `fast-uri` 3.1.8 /
4.2.1, `ip-address` 10.7.2, `compression` 1.8.2, `@fastify/busboy`
3.2.2, `@fastify/forwarded` 3.0.2, `systeminformation` 5.33.13,
`tinypool` 2.1.2, `axios` 1.20.0, `better-auth` ^1.6.26, `jose`
≥4.14→6.2.12, `ajv` 8.20.0, `hono` <4.13.8→4.13.8, `zod` 4.x→4.6.5.

## Dependabot expectation after merge
| Alert | Expectation |
|---|---|
| `extract-zip@2.0.1` (High ×2) | **Remain open** — no patched release
(`<=2.0.1`). Pulled by `@puppeteer/browsers`. Residual; dismiss with “no
patched release / transitive via puppeteer” or replace puppeteer browser
fetch path later. |
| `@ai-sdk/provider-utils` <3.0.28 (Low ×4) | **3.x/4.x/5.x lines
already floored**. Residual on **`2.2.8`** in `packages/_vendored/ai_v4`
+ AI SDK v4 consumers — bumping to 3.x breaks AI SDK v4 contract. Keep /
dismiss as risk-accepted until vendored AI SDK v4 is retired. |

## Residuals (mastra Aikido / intentional)
- **`zod@3.25.76`** — AIKIDO fixes are 4.x-only; zod-v3 e2e + AI SDK v4
peers still need 3.x.
- **`raw-body@2.5.3` / `3.0.2`** — only fix is 4.0.0 (major); leave
until Express/body-parser adopt it.
- **`undici@6.28.1` / `7.29.1`** — some AIKIDO IDs only fixed on newer
majors; same-major already at current floors.
- **`yargs@17.7.3`** — fix is 18.1.0 (major).
- **`extract-zip@2.0.1`**, **`@ai-sdk/provider-utils@2.2.8`** — see
Dependabot table.

## Test plan
- [x] `pnpm install --frozen-lockfile` at repo root
- [x] No `proxy-addr@2.0.7` in any lockfile on branch
- [x] Root lock has `@fastify/proxy-addr@5.1.1`
- [ ] Required CI green on this PR (do not merge)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5

This PR tells the project to use safer versions of several third-party
packages. It also updates nested dependency locks so security scans no
longer find the affected vulnerable versions.

## Summary

- Added or updated pnpm overrides across the root project, e2e
workspaces, examples, and OTEL bridge examples.
- Removed references to `proxy-addr@2.0.7` from affected nested
lockfiles.
- Raised dependency floors for:
  - `@fastify/proxy-addr`
  - `fast-uri`
  - `ip-address`
  - `compression`
  - `@fastify/busboy`
  - `@fastify/forwarded`
  - `systeminformation`
  - `tinypool`
  - `axios`
  - `better-auth`
  - `jose`
  - `ajv`
  - `hono`
  - `zod`
- Updated `minimumReleaseAgeExclude` entries for selected patched
package versions.
- Added workspace overrides for related transitive dependencies,
including `qs`, `brace-expansion`, `nanoid`, `js-yaml`, `adm-zip`, and
`image-size`.
- Updated OTEL bridge build permissions for `esbuild` and `protobufjs`.
- Residual findings remain for dependencies such as `extract-zip@2.0.1`
and `@ai-sdk/provider-utils@2.2.8` because of compatibility or patch
availability constraints.
- Test results and CI completion status are not established by the
supplied change summaries.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-22 10:57:10 -04:00
shreyas-mastra
5bfe0af40c
security: clear remaining Dependabot alerts + raise Aikido floors (round 2) (#24391) 2026-09-18 07:48:18 -07:00
Daniel Lew
2ea44c1b57
feat(mcp)!: adopt the native 2026-07-28 request lifecycle (#23876)
Co-authored-by: Mastra Code (anthropic/claude-fable-5-1) <noreply@mastra.ai>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-18 09:53:38 -04:00
Marvin Frachet
ed68ec727a
feat(playground): add readable trace payload previews (#24322)
Trace inputs and outputs now have read-only previews for messages,
reasoning, tool calls, attachments, and interrupted runs. A JSON switch
exposes the original payload, with consistent Shiki rendering across
payloads, errors, metadata, and attributes. Unsupported shapes retain a
JSON fallback, and recorded tools never expose execution or approval
actions.

Includes component tests and Storybook coverage for the panel and detail
views, along with changesets. The branch also includes previously
committed agent example dependency updates.

Validation: 36 focused span-payload tests pass, playground-ui typecheck
passes, and lint/pre-commit checks pass. Earlier iterations were also
checked in Storybook across mobile, tablet, and desktop; the latest
switch and spacing changes were covered by component tests.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

The playground now shows trace data in a readable format. Users can
switch to the original JSON, while recorded tool calls remain view-only.

## Changes

- Added shared renderers for messages, reasoning, tool calls, results,
attachments, model outputs, interruptions, tripwires, and errors.
- Added rich/JSON views with consistent Shiki JSON highlighting.
- Added JSON fallbacks for unsupported payloads.
- Kept recorded tools read-only without execution, approval, or resume
actions.
- Added safe rendering for valid HTTP(S) media attachments.
- Replaced trace input, output, error, metadata, and attribute sections
with shared payload sections.
- Added copy controls and panel/details layouts.
- Added component tests, Storybook stories, and changesets.
- Updated example dependencies and Storybook build configuration.

## Validation

The supplied summary reports 36 focused span-payload tests, UI
typechecking, lint, and pre-commit checks. Individual command results
are not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-18 08:15:38 +02:00
shreyas-mastra
95f1ad9148
security: raise pnpm override floors for Vanta/Dependabot (proxy-addr critical) (#24327) 2026-09-17 14:57:25 -07:00