fix(mitmproxy): mitigate CVE-2026-49854 via TORNADO_EXTENSION=0#22
Merged
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.
Context
Code scanning alert #19 (Trivy, LOW):
tornado 6.5.5in the mitmproxy image has an out-of-bounds read in the Cwebsocket_maskextension (CVE-2026-49854), reachable from mitmweb's XSRF decoder.Why not just upgrade
tornadois a transitive dependency of mitmproxy, and the latest mitmproxy (12.2.3) capstornado<=6.5.5,>=6.5.0. The fix is in tornado 6.5.6, so it cannot be installed without breaking mitmproxy's dependency constraint. The image already pulls the latest mitmproxy (unpinned + weeklyno-cacherebuild), so it lands right back on the flagged 6.5.5.Fix
mitmproxy/Dockerfile: setENV TORNADO_EXTENSION=0— the advisory's recommended mitigation.tornado.utilreads this at import time and falls back to the pure-Pythonwebsocket_mask, so the vulnerable C code is never loaded. No dependency conflict; perf cost is irrelevant for a local admin UI..trivyignore: suppress CVE-2026-49854 with justification (read automatically by trivy-action from the repo root). Documented removal condition: drop both once mitmproxy allowstornado>=6.5.6.After merge, run the weekly scan (
gh workflow run scheduled-scan.yml) to auto-resolve alert #19.