-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix RCE vulnerability in Pixeltable MCP tools (eval/exec injection) #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
akuligowski9
wants to merge
4
commits into
patchy631:main
Choose a base branch
from
akuligowski9:fix/pixeltable-mcp-eval-injection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+174
−26
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
21b6e67
Fix RCE vulnerability in Pixeltable MCP tools via eval/exec injection
akuligowski9 c51cf96
Address CodeRabbit review feedback
akuligowski9 875c7dc
Address second round of CodeRabbit review feedback
akuligowski9 72a21c5
Use operator.invert for ast.Not to produce Pixeltable expressions
akuligowski9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 225
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 108
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 2217
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 54
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 202
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 594
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 1146
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 962
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 1446
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 54
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 245
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 54
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 1507
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 1418
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 1439
🏁 Script executed:
Repository: patchy631/ai-engineering-hub
Length of output: 144
🌐 Web query:
Pixeltable create_named_query API documentation💡 Result:
Pixeltable does not have a
create_named_queryAPI in its Python SDK docs; that method name is commonly associated with AWS Athena / boto3 (unrelated to Pixeltable).In Pixeltable, the closest equivalents to a “named/saved query” are:
pxt.create_view(path, base=Query|Table, ...)(this persists the query as a view you canpxt.get_table()later). [1]@pxt.querydecorator (commonly used for retrieval helpers in RAG-style pipelines). [2]pixeltable.QueryAPI (eg,where(),select(),order_by(),collect()). [3]Sources:
[1] Pixeltable SDK
create_view()reference https://docs.pixeltable.com/sdk/latest/pixeltable[2] Example of
@pxt.queryusage in Pixeltable docs (VoyageAI integration page) https://docs.pixeltable.com/sdk/v0.5.3/voyageai[3] Pixeltable
Queryclass reference https://docs.pixeltable.com/sdk/v0.5.1/queryThe built query is never persisted —
query_nameis unused beyond the success message.The function constructs a query object but never persists it via Pixeltable's API. Unlike the parallel
create_view()function (line 264), which explicitly callspxt.create_view(),create_query()builds a query without storing it. Thequery_nameparameter is used only in the return string (line 401) and has no other effect. This means the function claims to "create" a named query but does not actually register it anywhere, making it impossible to retrieve later.To fix this, either:
pxt.create_view(query_name, query)if the intent is to persist as a view, or🧰 Tools
🪛 Ruff (0.15.1)
[warning] 401-401: Consider moving this statement to an
elseblock(TRY300)
🤖 Prompt for AI Agents