Test-More / Test-More/Test2-Harness

yath displays arbitrary filenames without escaping

Open
#286 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
28
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Inspired by https://www.openwall.com/lists/oss-security/2025/08/13/4 which talks about how unescaped filenames can be used to trigger vulnerabilities in terminals etc.

mkdir -p t
touch t/$(printf "file\e[H\e[0j\e[1mBoo\e[0m.t"))

yath

this will output unescaped filenames and run some annoying ANSI sequences.

Either escape the filenames before printing, or be more restrictive about the filenames that are handled (though escape them when showing errors)

See also https://github.com/Perl-Toolchain-Gang/Test-Harness/issues/144

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the yath command and reproduce the issue using the shell commands in the report, then trace where filenames are printed. Ensure terminal control sequences are escaped when filenames and errors are displayed, and rerun the reproduction to confirm the output is safe.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.