[Aikido] Fix 8 security issues in socket.io-parser, next, axios and 1 more#23
Open
aikido-autofix[bot] wants to merge 1 commit intomainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade socket.io-parser, Next, Axios, and AI to fix DoS vulnerabilities including memory exhaustion, request smuggling, and malicious config crashes. This update includes breaking changes that require manual migration.
The codebase is already using
aipackage version 6.0.138 (newer than the target 6.0.84), but the code still uses the deprecatedCoreMessagetype which was removed in version 6.0.0. This indicates the code is currently broken or will break when properly type-checked.Breaking Change:
CoreMessagetype removedWhere your code is affected:
lib/workflows/chat_workflow.ts(line 3, line 25): Imports and usesCoreMessagetypeapp/api/chat/route.ts(line 8, line 138, line 154, line 169): Imports and usesCoreMessagetype for message arraysapp/api/web/chats/[chatId]/messages/route.ts(line 5, line 119, line 125): Imports and usesCoreMessagetypeapp/api/chat/group-ai-response/route.ts(line 5, line 73, line 103): Imports and usesCoreMessagetypeImpact: All files importing
type CoreMessage from 'ai'will fail to compile because this type no longer exists in theaipackage. The code is using a removed API that was deprecated in v5.0 and removed in v6.0.Remediation: Replace all instances of
CoreMessagewithModelMessageand update the import statements fromimport { streamText, type CoreMessage } from 'ai'toimport { streamText, type ModelMessage } from 'ai'. Update all variable declarations fromCoreMessage[]toModelMessage[].Note: The socket.io-parser upgrade (4.2.4 => 4.2.6) has no impact on this codebase as no binary attachments are being sent through socket.io connections.
All breaking changes by upgrading socket.io-parser from version 4.2.4 to 4.2.6 (CHANGELOG)
All breaking changes by upgrading ai from version 5.0.115 to 6.0.84 (CHANGELOG)
Experimental_Agentclass replaced withToolLoopAgentclass;systemparameter renamed toinstructions; defaultstopWhenchanged fromstepCountIs(1)tostepCountIs(20)CoreMessagetype andconvertToCoreMessagesfunction removed; must useModelMessagetype andconvertToModelMessagesfunction insteadconvertToModelMessages()is now async and requiresawaitTool.toModelOutput()now receives a parameter object with anoutputproperty instead of receiving the output directly as the argumentcachedInputTokensandreasoningTokensinLanguageModelUsagedeprecated; replaced withinputTokenDetails.cacheReadTokensandoutputTokenDetails.reasoningTokensToolCallOptionstype renamed toToolExecutionOptionsstrictproperty instead of globalstrictJsonSchemainproviderOptionsToolCallRepairFunctionsignature changed:systemparameter now acceptsSystemModelMessagein addition tostringtextEmbeddingModelandtextEmbeddingmethods renamed toembeddingModelandembedding; generics removed fromEmbeddingModel,embed, andembedManyWarningtypeisToolUIPartrenamed toisStaticToolUIPart;isToolOrDynamicToolUIPartrenamed toisToolUIPartgetToolNamerenamed togetStaticToolName;getToolOrDynamicToolNamerenamed togetToolNamestrictJsonSchemanow defaults totrueinstead offalsestructuredOutputsprovider option removed from chat modelsazure()now uses Responses API by default instead of Chat Completions API; useazure.chat()for previous behaviorazurekey forproviderMetadataandproviderOptionsinstead ofopenaivertexkey forproviderMetadataandproviderOptionsinstead ofgoogleai/testmodule; must use V3 mock classes insteadEmbeddingModelV3chat.addToolResult()renamed tochat.addToolOutput()aiandai/mcp-stdioto@ai-sdk/mcpand@ai-sdk/mcp/mcp-stdiopackages✅ 8 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
DELETE/OPTIONSrequests allows attackers to bypass route restrictions and access unintended backend endpoints. An attacker could smuggle malicious requests to internal or admin routes through request boundary disagreement between proxy and backend.remotePatternsis configured. This causes out-of-memory conditions and application unavailability.🔗 Related Tasks