CVEfocus › CVE database › CVE-2025-23395

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

CVSS 7.8 HighEPSS 0.2% (higher than 9% of CVEs)Published 2025-05-26Updated 2025-05-27Assigner: suse

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

CWE-271

What to do

Fixed builds are available from Alpine: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
5Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04screenNot affected
vulnerable_code_not_present
Ubuntu 22.04screenNot affected
vulnerable_code_not_present
Ubuntu 20.04screenNot affected
vulnerable_code_not_present
Red Hat Enterprise Linux 7screenNot affected
Red Hat Enterprise Linux 6screenNot affected
Alpine Linux 3.24screenFixed5.0.1-r0ALPINE-CVE-2025-23395
Alpine Linux 3.23screenFixed5.0.1-r0ALPINE-CVE-2025-23395
Alpine Linux 3.22screenFixed5.0.1-r0ALPINE-CVE-2025-23395
Alpine Linux 3.21screenFixed5.0.1-r0ALPINE-CVE-2025-23395

What the vendor says

As published in the CVE record by suse, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.