CVE-2026-71410: Use-After-Free in GNU Screen
GNU Screen is vulnerable to a Use-After-Free in the utf8handlecomb() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
GNU Screento a version that resolves this vulnerability.Fixed in 5.0.2
Event History
Frequently Asked Questions
Who is realistically exposed to this vulnerability?
Users running GNU Screen who connect to untrusted or rogue SSH servers, or whose Screen sessions can receive attacker-controlled terminal output or crafted escape sequences, are exposed. The attacker needs control over content delivered to the terminal session.
What does an attacker need to trigger the flaw?
The issue requires a memory-allocation failure in utf8_handle_comb(), followed by delivery of a subsequent combining Unicode character. The described exploitation path uses attacker-controlled terminal content to groom the heap and dereference the freed combchars pointer.
Which version contains the fix?
The issue was fixed in GNU Screen version 5.0.2.