VDB
Sign up
MEDIUM4.3

GHSA-866g-f22w-33x8

@ai-sdk/provider-utils has an Uncontrolled Resource Consumption issue

Quick fix

GHSA-866g-f22w-33x8 — @ai-sdk/provider-utils: upgrade to the fixed version with the command below.

npm install @ai-sdk/provider-utils@3.0.28

Details

Versions of `@ai-sdk/provider-utils` before 3.0.28, from 4.0.0 before 4.0.33, and from 5.0.0 before 5.0.1 are vulnerable to uncontrolled resource consumption. The `createJsonResponseHandler`, `createJsonErrorResponseHandler`, and `createStatusCodeErrorResponseHandler` functions in `packages/provider-utils/src/response-handler.ts` read response bodies without a shared size limit, allowing a remote attacker with low privileges to cause excessive memory consumption. The exploit has been publicly disclosed and may be utilized.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/@ai-sdk/provider-utils
Introduced in: 0Fixed in: 3.0.28
Fixnpm install @ai-sdk/provider-utils@3.0.28
npm/@ai-sdk/provider-utils
Introduced in: 4.0.0-beta.10Fixed in: 4.0.33
Fixnpm install @ai-sdk/provider-utils@4.0.33
npm/@ai-sdk/provider-utils
Introduced in: 5.0.0-beta.0Fixed in: 5.0.1
Fixnpm install @ai-sdk/provider-utils@5.0.1

References