Summary
The XLS IR visualization web app (xls/visualization/ir_viz/app.py) enables Flask’s development/debug mode unconditionally and listens on all network interfaces. Any unhandled exception while handling a request is therefore answered with the Werkzeug interactive debugger HTML (not a generic 500 page), which is intended for trusted local development only.
Evidence in code
- After creating the Flask app,
webapp.debug is set to True with no environment-based override in this module.
webapp.run(...) is called with host='0.0.0.0' (IPv4) or '::' (IPv6) and a user-chosen port, and without passing debug=False or use_debugger=False, so Flask’s defaults apply: use_debugger follows app.debug (see Flask Flask.run implementation).
Runtime behavior (verified pattern)
With app.debug = True and app.run(...) omitting debug, a route that raises returns HTTP 500 whose body includes the Werkzeug Debugger UI (e.g. __debugger__ resources, EVALEX enabled in the page). The same mechanism applies to this app whenever an exception propagates from a view/handler.
Affected component
- File:
xls/visualization/ir_viz/app.py
- Entry:
main() → webapp.run(...)
Preconditions
An attacker must be able to reach the bound TCP port (e.g. same LAN/VPN, misbound container port, or user who mistakenly exposes the tool). Triggering an exception may be as simple as malformed input or dependency/tooling errors on specific endpoints (e.g. subprocess failures when invoking bundled binaries).
Who can exploit it: Any network client that can open a TCP connection to the listening address (0.0.0.0 / :: on the chosen port) while the IR visualization server is running—without authentication, because the app does not implement access control for those debug artifacts.
What they gain:
- Confidentiality: Detailed tracebacks and local paths/source context in the debugger page can leak implementation details, file layout, versions, and sometimes sensitive data present in stack frames.
- Integrity / availability: The interactive debugger is designed for arbitrary Python evaluation in the server process (PIN-gated in Werkzeug, but still inappropriate on an exposed interface). Successful misuse yields remote code execution in the same privilege context as the server process.
- Misconfiguration amplification: Binding to all interfaces makes accidental exposure (e.g. laptop on coffee-shop Wi‑Fi, cloud VM with security group left open) much more likely than
127.0.0.1 alone.
Severity note: Risk is highest when users run this tool on a shared or routable network believing it is a “local viewer,” because the combination debug + 0.0.0.0 turns routine errors into a publicly reachable debugging surface.
Summary
The XLS IR visualization web app (
xls/visualization/ir_viz/app.py) enables Flask’s development/debug mode unconditionally and listens on all network interfaces. Any unhandled exception while handling a request is therefore answered with the Werkzeug interactive debugger HTML (not a generic 500 page), which is intended for trusted local development only.Evidence in code
webapp.debugis set toTruewith no environment-based override in this module.webapp.run(...)is called withhost='0.0.0.0'(IPv4) or'::'(IPv6) and a user-chosen port, and without passingdebug=Falseoruse_debugger=False, so Flask’s defaults apply:use_debuggerfollowsapp.debug(see FlaskFlask.runimplementation).Runtime behavior (verified pattern)
With
app.debug = Trueandapp.run(...)omittingdebug, a route that raises returns HTTP 500 whose body includes the Werkzeug Debugger UI (e.g.__debugger__resources,EVALEXenabled in the page). The same mechanism applies to this app whenever an exception propagates from a view/handler.Affected component
xls/visualization/ir_viz/app.pymain()→webapp.run(...)Preconditions
An attacker must be able to reach the bound TCP port (e.g. same LAN/VPN, misbound container port, or user who mistakenly exposes the tool). Triggering an exception may be as simple as malformed input or dependency/tooling errors on specific endpoints (e.g. subprocess failures when invoking bundled binaries).
Who can exploit it: Any network client that can open a TCP connection to the listening address (
0.0.0.0/::on the chosen port) while the IR visualization server is running—without authentication, because the app does not implement access control for those debug artifacts.What they gain:
127.0.0.1alone.Severity note: Risk is highest when users run this tool on a shared or routable network believing it is a “local viewer,” because the combination debug + 0.0.0.0 turns routine errors into a publicly reachable debugging surface.