Screen GNU Screen

Don't miss out!

Thousands of developers use stack.watch to stay informed.
Get an email whenever new security vulnerabilities are reported in GNU Screen.

By the Year

In 2026 there have been 3 vulnerabilities in GNU Screen with an average score of 4.1 out of ten. Last year, in 2025 Screen had 5 security vulnerabilities published. Right now, Screen is on track to have less security vulnerabilities in 2026 than it did last year.




Year Vulnerabilities Average Score
2026 3 4.07
2025 5 0.00
2024 0 0.00
2023 1 6.50
2022 0 0.00
2021 1 9.80
2020 1 0.00

It may take a day or so for new Screen vulnerabilities to show up in the stats or in the list of recent security vulnerabilities. Additionally vulnerabilities may be tagged under a different product or component name.

Recent GNU Screen Security Vulnerabilities

GNU Screen <5.0.2 TOCTOU Hardcopy Race Condition PrivEsc
CVE-2026-71411 5.5 - Medium - November 26, 2026

GNU Screen is vulnerable to a Time-of-Check/Time-of-Use (TOCTOU) race condition in the hardcopy file handler. Due to checking write permissions using the real user ID and subsequently opening the file using the effective user ID, a local unprivileged attacker can atomically replace the target path with a symbolic link pointing to an arbitrary system file. Successfully exploiting this race condition allows the attacker to write to arbitrary files with root privileges, leading to local privilege escalation This issue was fixed in version 5.0.2.

TOCTTOU

GNU Screen <5.0.2 Use-After-Free in utf8_handle_comb (encoding.c)
CVE-2026-71410 2.1 - Low - November 26, 2026

GNU Screen is vulnerable to a Use-After-Free in the utf8_handle_comb() function in encoding.c. Due to improper error handling during memory allocation failure, the global combchars pointer is freed but not reset to NULL. When a subsequent combining Unicode character arrives at the terminal, the function dereferences the freed pointer. An attacker who controls terminal content sent to the screen session, such as via a rogue SSH server or crafted escape sequences, can exploit this vulnerability to perform heap grooming and achieve arbitrary code execution. This issue was fixed in version 5.0.2.

Dangling pointer

GNU Screen <5.0.2 Buffer overflow in SendCmdMessage (attacher.c)
CVE-2026-71409 4.6 - Medium - November 26, 2026

GNU screen is vulnerable to a global buffer overflow in the SendCmdMessage() function within attacher.c. Due to the use of an unchecked sprintf() call when appending the STY environment variable to the global SocketPath buffer. The vulnerability occurs when GNU screen is executed in an environment where the HOME and STY environment variables contain attacker-controlled values that are sufficiently long. Successful exploitation may result in an application crash or potentially arbitrary code execution. This issue was fixed in version 5.0.2.

Classic Buffer Overflow

screen session PTY set to 666 allows local takeover
CVE-2025-46802 - May 26, 2025

For a short time they PTY is set to mode 666, allowing any user on the system to connect to the screen session.

CVE-2025-23395: Screen 5.0.0 setuid-root PrivEsc via Unprivileged File Creation
CVE-2025-23395 - May 26, 2025

Screen 5.0.0 when it runs with setuid-root privileges does not drop privileges while operating on a user supplied path. This allows unprivileged users to create files in arbitrary locations with `root` ownership, the invoking user's (real) group ownership and file mode 0644. All data written to the Screen PTY will be logged into this file, allowing to escalate to root privileges

Privilege Dropping / Lowering Errors

Screen PTYs Mode Change (0622) Allows Write to All PTYs
CVE-2025-46803 - May 26, 2025

The default mode of pseudo terminals (PTYs) allocated by Screen was changed from 0620 to 0622, thereby allowing anyone to write to any Screen PTYs in the system.

Incorrect Default Permissions

Screen <5.0.0 TOCTOU race allows SIGHUP/SIGCONT to privileged processes
CVE-2025-46805 - May 26, 2025

Screen version 5.0.0 and older version 4 releases have a TOCTOU race potentially allowing to send SIGHUP, SIGCONT to privileged processes when installed setuid-root.

TOCTTOU

Info Leak in GNU Screen 5.0.0 via setuid-root
CVE-2025-46804 - May 26, 2025

A minor information leak when running Screen with setuid-root privileges allows unprivileged users to deduce information about a path that would otherwise not be available. Affected are older Screen versions, as well as version 5.0.0.

Side Channel Attack

Local Privilege Escalation in Screen 4.9.0 via setuid socket (CVE202324626)
CVE-2023-24626 6.5 - Medium - April 08, 2023

socket.c in GNU Screen through 4.9.0, when installed setuid or setgid (the default on platforms such as Arch Linux and FreeBSD), allows local users to send a privileged SIGHUP signal to any PID, causing a denial of service or disruption of the target process.

encoding.c in GNU Screen through 4.8.0
CVE-2021-26937 9.8 - Critical - February 09, 2021

encoding.c in GNU Screen through 4.8.0 allows remote attackers to cause a denial of service (invalid write access and application crash) or possibly have unspecified other impact via a crafted UTF-8 character sequence.

Argument Injection

A buffer overflow was found in the way GNU Screen before 4.8.0 treated the special escape OSC 49
CVE-2020-9366 - February 24, 2020

A buffer overflow was found in the way GNU Screen before 4.8.0 treated the special escape OSC 49. Specially crafted output, or a special program, could corrupt memory and crash Screen or possibly have unspecified other impact.

GNU screen before 4.5.1
CVE-2017-5618 - March 20, 2017

GNU screen before 4.5.1 allows local users to modify arbitrary files and consequently gain root privileges by leveraging improper checking of logfile permissions.

GNU screen 4.0.3 allows local users to unlock the screen via a CTRL-C sequence at the password prompt
CVE-2007-3048 - June 05, 2007

GNU screen 4.0.3 allows local users to unlock the screen via a CTRL-C sequence at the password prompt. NOTE: multiple third parties report inability to reproduce this issue

Stay on top of Security Vulnerabilities

Want an email whenever new vulnerabilities are published for GNU Screen or by GNU? Click the Watch button to subscribe.

GNU
Vendor

GNU Screen
Product

subscribe