Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[P2] Define safe plain-text handling of terminal control characters

Open
#84 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
desktop, security

Research direction

Start with src/TermBlade.Core/Buffer/CellBuffer.cs and the rendering paths in src/TermBlade.Core/Rendering/Renderer.cs and src/TermBlade.Core/Rendering/CliRenderer.cs; trace how plain-text cells reach captured output. Define and test a safe policy for user-supplied control characters while keeping intentional framework ANSI generation separate. Done means captured plain-text output emits no user-supplied control bytes and the separate ANSI behavior remains tested.

Written by the indexing model from the issue text.

Description

bug

Audit of main at 33775b35ce39b259cc6a4ea33db6216aba19d702 on 2026-10-08. Priority P2; area: Security.

Problem

Plain-text cells accept C0 control characters and render them directly to the host terminal. Untrusted file/CSV/display text can therefore trigger terminal actions rather than remain inert text.

Evidence / reproduction

DrawText("\a",...) followed by Renderer.Render emits a literal BEL (raw BEL=True). ESC, carriage return and other control scalars also lack validation at SetCell/DrawText. The audit demonstrates control-character emission, not arbitrary remote code execution or a complete OSC exploit.

Source: src/TermBlade.Core/Buffer/CellBuffer.cs:123, src/TermBlade.Core/Rendering/Renderer.cs:173, src/TermBlade.Core/Rendering/CliRenderer.cs:541.

Suggested change

Define a safe plain-text scalar policy and escape/replace controls in display paths. Keep any intentional raw-ANSI output as a clearly separate trusted API; handle tabs/newlines through layout rather than embedded control cells.

Acceptance criteria
  • Captured output never emits user-supplied control bytes from plain-text cells.
  • Untrusted filenames/CSV fields preserve surrounding terminal content.
  • Intentional framework ANSI generation continues to work and is tested separately.
Dominant language
C#
Stars
1
Forks
0
Avg merge
3d 7h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evilz/TermBlade

All issues in evilz/TermBlade

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.