[Security] Fix CRITICAL vulnerability: V-001#1779
Open
orbisai0security wants to merge 1 commit into
Open
Conversation
Automatically generated security fix
✅ Deploy Preview for agent-tars-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tarko ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Security Fix
This PR addresses a CRITICAL severity vulnerability detected by our security scanner.
Security Impact Assessment
Evidence: Proof-of-Concept Exploitation Demo
This demonstration shows how the vulnerability could be exploited to help you understand its severity and prioritize remediation.
How This Vulnerability Can Be Exploited
The vulnerability in
multimodal/tarko/agent-server-next/src/controllers/user.tsallows an authenticated attacker to bypass authorization checks in theupdateUserConfiganddeleteUserConfigfunctions, enabling them to modify or delete any user's configuration by simply specifying the targetuserIdin the request body. This is an insecure direct object reference (IDOR) issue, where the code trusts the client-provideduserIdwithout verifying ownership. In the context of the UI-TARS-desktop repository—a multimodal AI agent system with a Node.js-based server component—an attacker with valid authentication (e.g., via a session token or API key) can exploit this to alter or remove configurations for other users, potentially disrupting the application's behavior or leaking sensitive data stored in configs.The vulnerability in
multimodal/tarko/agent-server-next/src/controllers/user.tsallows an authenticated attacker to bypass authorization checks in theupdateUserConfiganddeleteUserConfigfunctions, enabling them to modify or delete any user's configuration by simply specifying the targetuserIdin the request body. This is an insecure direct object reference (IDOR) issue, where the code trusts the client-provideduserIdwithout verifying ownership. In the context of the UI-TARS-desktop repository—a multimodal AI agent system with a Node.js-based server component—an attacker with valid authentication (e.g., via a session token or API key) can exploit this to alter or remove configurations for other users, potentially disrupting the application's behavior or leaking sensitive data stored in configs.To demonstrate exploitation, assume the server is running locally on
http://localhost:3000(based on typical Next.js/Express setups in the repository's structure). An attacker first authenticates to obtain a session token (e.g., via a login endpoint like POST /auth/login). Then, they craft HTTP requests targeting the vulnerable endpoints, which likely map to routes such as PUT /user/config for updates and DELETE /user/config for deletions, based on the controller file's structure. The PoC uses Node.js to simulate authenticated requests, exploiting the lack of permission checks.Exploitation Impact Assessment
Vulnerability Details
V-001multimodal/tarko/agent-server-next/src/controllers/user.tsupdateUserConfiganddeleteUserConfigcontroller functions directly use theuserIdfrom the request body to perform database operations without verifying if the authenticated user has permission to act on the target user's account. This allows any authenticated user to modify or delete any other user's configuration.Changes Made
This automated fix addresses the vulnerability by applying security best practices.
Files Modified
examples/operator-browserbase/.env.exampleexamples/operator-browserbase/app/api/agent/route.tsmultimodal/tarko/agent-server-next/src/controllers/user.tsmultimodal/tarko/agent-server/src/server.tsVerification
This fix has been automatically verified through:
🤖 This PR was automatically generated.