Skip to content
Discussion options

You must be logged in to vote

Thanks for reporting this!

typer.echo() intentionally supports terminal escape sequences, including those used for colors. Applications displaying untrusted content should escape control characters before printing it.

Your point about Typer's own error messages is worth addressing. I confirmed that some error paths include user-supplied values without escaping terminal controls, including unexpected arguments and unknown options.

I've opened PR #1972 to escape those characters. This preserves the existing behavior of typer.echo() and the original values passed to application code.

The example here demonstrates expected output behavior, but doesn't establish a security vulnerability on its…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tiangolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants