Skip to content

security: HTML injection in auth error output #199

@nathanschram

Description

Description

In the auth module, subprocess output is inserted into <pre> HTML tags without escaping <, >, and & characters. A crafted error message from a subprocess could inject Telegram HTML entities, potentially altering message formatting or including misleading content.

Affected files

  • src/untether/telegram/auth.py:168 (approx)

Impact

Telegram HTML entity injection — could be used for social engineering (e.g. injecting fake "Approved" messages into error output).

Recommended fix

import html
escaped_output = html.escape(subprocess_output)
message = f"<pre>{escaped_output}</pre>"

Severity

MEDIUM — limited to message formatting manipulation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions