CVE-2026-74889: Insecure Os System Screen Clear

Using os.system('clear') or os.system('cls') to clear the terminal relies on external binary resolution via PATH and shell execution, risking PATH hijacking. Use ANSI escape sequences (e.g. sys.stdout.write('\033[2J\033[H')) instead.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-74889-insecure-os-system-screen-clear --engine opengrep

Description

Using os.system('clear') or os.system('cls') to clear the terminal relies on external binary resolution via PATH and shell execution, risking PATH hijacking. Use ANSI escape sequences (e.g. sys.stdout.write('\033[2J\033[H')) instead.