CVE-2025-23395: Screen 5.0.0 setuid-root PrivEsc via Unprivileged File Creation
CVE-2025-23395 Published on May 26, 2025
Local root exploit via `logfile_reopen()` in screen 5.0.0 with setuid-root bit set
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
Vulnerability Analysis
CVE-2025-23395 can be exploited with local system access, and requires small amount of user privileges. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2025-23395. The potential impact of an exploit of this vulnerability is considered to be very high.
Weakness Type
Privilege Dropping / Lowering Errors
The software does not drop privileges before passing control of a resource to an actor that does not have those privileges. In some contexts, a system executing with elevated permissions will hand off a process/file/etc. to another process or user. If the privileges of an entity are not reduced, then elevated privileges are spread throughout a system and possibly to an attacker.
Products Associated with CVE-2025-23395
Want to know whenever a new CVE is published for GNU Screen? stack.watch will email you.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.