Screen Package Vulnerability: PTY Permission Change in Alpine Linux
Summary
ALPINE-CVE-2025-46803: 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. Affects screen versions < 5.0.1-r0. Fixed in 5.0.1-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Screen package is a terminal multiplexer that allows users to manage multiple terminal sessions from a single interface. It is widely used in Unix-like operating systems, including Alpine Linux, for its ability to detach and reattach sessions, making it ideal for remote work and server management. The vulnerability in question arises from a change in the default permissions for pseudo terminals (PTYs), which can expose users to unauthorized access.
Vulnerability Detail
The vulnerability stems from a modification in the default mode of pseudo terminals allocated by the Screen package, changing it from 0620 to 0622. This alteration permits any user on the system to write to any Screen PTYs, potentially leading to unauthorized access and manipulation of terminal sessions. This change can compromise the security of user data and system integrity, especially in multi-user environments.
How To Fix
Minimum fixed version
5.0.1-r0
This is the first release that contains the fix.
sudo apk add --upgrade screen
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can manually change the permissions of the PTYs back to 0620 by executing the following command: 'chmod 0620 /dev/pts/*'. However, this is not a permanent solution and updating the package is recommended.
Conclusion
The Screen package vulnerability in Alpine Linux poses a significant risk due to the change in PTY permissions. Users are strongly advised to update to the patched version to mitigate potential security threats. Temporary workarounds are available, but they do not replace the need for a proper update.
See every vulnerability recorded for screen →
FAQ
The vulnerability allows unauthorized users to write to Screen PTYs, which can lead to session hijacking and data exposure.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
Yes, the patched version of the Screen package is 5.0.1-r0, which resolves this issue.
As a temporary measure, you can change the permissions of the PTYs to restrict access using 'chmod 0620 /dev/pts/*'.
For real-time monitoring and alerts on open-source vulnerabilities, you can visit Vulert at https://vulert.com.
References
Related vulnerabilities
Recent vulnerabilities recorded for screen.