CVE-2025-23395: Local root exploit via `logfile_reopen()` in screen 5.0.0 with setuid-root bit set

7.8 CVSS

Description

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

Classification

CVE ID: CVE-2025-23395

CVSS Base Severity: HIGH

CVSS Base Score: 7.8

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Problem Types

CWE-271: Privilege Dropping / Lowering Errors

Affected Products

Vendor:

Product:

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.01% (probability of being exploited)

EPSS Percentile: 1.43% (scored less or equal to compared to others)

EPSS Date: 2025-06-08 (when was this score calculated)

References

https://nvd.nist.gov/vuln/detail/CVE-2025-23395
https://bugzilla.suse.com/show_bug.cgi?id=CVE-2025-23395
https://www.openwall.com/lists/oss-security/2025/05/12/1

Timeline