Skip to content

Align AI SDK v5 packages on @ai-sdk/provider-utils >=3.0.28 (GHSA-866g-f22w-33x8) #167

Open

Description

@byapparov

Split out of #50 (Dependabot alert #12, GHSA-866g-f22w-33x8, low).

Problem

Before 3.0.28, @ai-sdk/provider-utils reads response bodies in createJsonResponseHandler, createJsonErrorResponseHandler and createStatusCodeErrorResponseHandler with no size limit. A provider endpoint can return a huge body and exhaust memory.

packages/cli pins @ai-sdk/provider-utils 3.0.21 directly, and the in-repo Copilot provider (src/provider/sdk/copilot/*) uses it. Every @ai-sdk/* provider package and ai 5.0.124 also pin their own exact copies, 3.0.20 to 3.0.22.

Why it was not bumped in the #50 PR

  • Bumping only the direct dependency to 3.0.28 brings in @ai-sdk/provider 2.0.3 nested under it. The Copilot provider imports @ai-sdk/provider 2.0.1, so the two copies of APICallError / ResponseHandler no longer match and tsc fails in openai-compatible-chat-language-model.ts with type errors (TS2322 / TS18046).
  • Later 3.0.x releases (3.0.33 and up, at least) also add undici as a runtime dependency.
  • Bumping the direct pin would not fix the copies that the provider packages and ai use at runtime. A real fix means bumping the AI SDK v5 set together (ai, @ai-sdk/provider, @ai-sdk/provider-utils and the @ai-sdk/* providers, patch or minor within the current majors), or adding an override, followed by provider regression testing.

Exposure

Only response bodies from the configured model provider endpoints are affected, so the endpoint, or a malicious base URL that a user configured, would have to return the oversized body.

Acceptance criteria

  • Every resolved copy of @ai-sdk/provider-utils in bun.lock is >= 3.0.28. Check with grep '@ai-sdk/provider-utils@' bun.lock.
  • A single @ai-sdk/provider version is used across ai, the providers and src/provider/sdk/copilot.
  • bun turbo typecheck passes, and test/provider and test/session pass.

Activity

  1. added
    P3Nice to have - Low
    securitySecurity vulnerabilities and hardening
    tech-debtTechnical debt cleanup
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to have - LowsecuritySecurity vulnerabilities and hardeningtech-debtTechnical debt cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions