Skip to content

fix(mitmproxy): mitigate CVE-2026-49854 via TORNADO_EXTENSION=0#22

Merged
Dxsk merged 1 commit into
mainfrom
fix/cve-2026-49854-tornado
Jun 15, 2026
Merged

fix(mitmproxy): mitigate CVE-2026-49854 via TORNADO_EXTENSION=0#22
Dxsk merged 1 commit into
mainfrom
fix/cve-2026-49854-tornado

Conversation

@Dxsk

@Dxsk Dxsk commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Context

Code scanning alert #19 (Trivy, LOW): tornado 6.5.5 in the mitmproxy image has an out-of-bounds read in the C websocket_mask extension (CVE-2026-49854), reachable from mitmweb's XSRF decoder.

Why not just upgrade

tornado is a transitive dependency of mitmproxy, and the latest mitmproxy (12.2.3) caps tornado<=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 + weekly no-cache rebuild), so it lands right back on the flagged 6.5.5.

Fix

  • mitmproxy/Dockerfile: set ENV TORNADO_EXTENSION=0 — the advisory's recommended mitigation. tornado.util reads this at import time and falls back to the pure-Python websocket_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 allows tornado>=6.5.6.

After merge, run the weekly scan (gh workflow run scheduled-scan.yml) to auto-resolve alert #19.

@Dxsk Dxsk merged commit 7bf22b8 into main Jun 15, 2026
4 checks passed
@Dxsk Dxsk deleted the fix/cve-2026-49854-tornado branch June 15, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant