mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-12 02:54:03 -05:00
[PR #14686] [CLOSED] [WIP] fix: mitigate DoS vulnerability in code-formatter processing #10352
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/14686
Author: @ShirasawaSama
Created: 6/5/2025
Status: ❌ Closed
Base:
dev← Head:fix_denial_of_service_for_code_formatter📝 Commits (3)
f5c7116fix(code-formatter): mitigate DoS vulnerability in input processinga9b31cffix: add ThreadPoolExecutor to avoid DoS vulnerability in input processing2c658fcstyle: format utils.py📊 Changes
1 file changed (+38 additions, -7 deletions)
View changed files
📝
backend/open_webui/routers/utils.py(+38 -7)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
CVE-2024-12537 indicates that there's a vulnerability in openwebui where a simple request can lead to a Denial of Service (DoS) on the backend.
The proof of concept (PoC) code is also very straightforward:
Based on my testing, concurrently formatting three separate code files each around 5MB can cause the backend to become unresponsive.
I believe this issue can be resolved by directly limiting the length of the code being formatted.
However, since Functions must be formatted before they can be saved on the frontend, I think this might be a potential issue too. Generally, Python codes do not exceed
256KBin length, so I believe this is acceptable.Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.