mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #22977] [CLOSED] fix(code-interpreter): inject Pyodide prompt into system message not user turn #26957
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22977
Author: @BillionClaw
Created: 3/24/2026
Status: ❌ Closed
Base:
main← Head:clawoss/fix/22965-pyodide-system-prompt-v2📝 Commits (1)
90807a6fix(code-interpreter): inject Pyodide prompt into system message not user turn📊 Changes
1 file changed (+4 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+4 -2)📄 Description
The code interpreter prompt (Pyodide) was injected into the user turn via add_or_update_user_message, creating a prompt injection vulnerability where a user could override the code interpreter instructions.
Changed add_or_update_user_message to add_or_update_system_message so the code interpreter prompt is injected as a system message where it cannot be tampered with by the user.
Fixes #22965
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.