Skip to content

Security scan: Potential command injection, XSS, and Flask debug mode — worth reviewing #158

@Lucky3mc

Description

@Lucky3mc

Hey, ran Assistant through debuggix.space. Found some patterns
worth reviewing. None are definitely exploitable — it depends on
deployment context and where user input flows. Sharing in case it helps.


🔴 Flask debug mode enabled — backend.py line 2539

If debug=True reaches production, the Werkzeug debugger allows
arbitrary code execution. If this is only for local development,
it's fine — just make sure it's off in production. Setting debug
via an environment variable is safer than hardcoding.

🟠 shell=True in 6 locations

• hooks.py lines 225, 248, 268, 287
• skills.py line 462
• aider_shell_tool.py line 57

If user input reaches any of these calls, command injection is
possible. If these only run trusted commands, it's fine. Worth
documenting. Consider shell=False or shlex.escape() for any
path that touches user input.

🟠 Jinja2 autoescape disabled — 3 locations

• common.py line 467
• project_store.py lines 59-60

Jinja2 defaults to autoescape=False. If user-supplied data renders
through these templates, it's XSS. Enable autoescape=True or use
select_autoescape().

🟡 dangerouslySetInnerHTML — ResultCard.tsx line 93

Passing a variable directly. If the source is untrusted, XSS is
possible. Consider DOMPurify before rendering.

🟡 Flask binding to 0.0.0.0 — backend.py line 2539

Probably needed for Docker. Worth documenting that it's intentional.

🟡 Dependency CVEs

aiohttp, python-dotenv, mistune — minor updates available via pip.


Like I said, these depend on context. Not claiming anything is
exploitable. Just patterns worth reviewing.

Took 60 seconds. Run it yourself if you want the full breakdown:
debuggix.space — free tier gives you 10 scans, no credit card.

Happy to discuss or delete this.

  • Lucky3mc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions