# CVE-2025-46802: Temporary chown() of users' TTY to mode 0666 allows PTY hijacking in screen

> A local attacker can hijack another user's screen session by connecting to a temporary world-writable PTY, leading to privilege escalation and data exposure.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 26 May 2025
- **Updated:** 27 May 2025
- **Also known as:** ALPINE-CVE-2025-46802, BELL-CVE-2025-46802, DEBIAN-CVE-2025-46802, GHSA-rh76-vmrr-w867, SUSE-SU-2025:02016-1, SUSE-SU-2025:02186-1, UBUNTU-CVE-2025-46802, openSUSE-SU-2025:15164-1

## What is CVE-2025-46802?

CVE-2025-46802 is a medium-severity vulnerability in SUSE Linux Enterprise Desktop 15 SP6, published on 26 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

For a short time they PTY is set to mode 666, allowing any user on the system to connect to the screen session.

Weakness: CWE-732 (Incorrect Permission Assignment for Critical Resource)

## Which versions are affected by CVE-2025-46802?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `screen` | SUSE:Linux Enterprise Micro 5.3 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | SUSE:Linux Enterprise Micro 5.4 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | SUSE:Linux Enterprise Micro 5.5 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 4.0.4-23.9.1 |
| `screen` | openSUSE:Leap 15.6 | All versions | 4.6.2-150000.5.8.1 |
| `screen` | openSUSE:Tumbleweed | All versions | 4.9.1-5.1 |

## How do I fix CVE-2025-46802?

Apply the vendor's patch.

## Is CVE-2025-46802 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46802 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-46802 and fix it if it is affected.

What it is: CVE-2025-46802 is a medium-severity vulnerability in SUSE Linux Enterprise Desktop 15 SP6, published on 26 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46802 exists.

Affected product: SUSE Linux Enterprise Desktop 15 SP6. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-46802/ (Markdown: https://insights.sbomify.com/CVE-2025-46802/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-46802
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-46802
- OSV: https://osv.dev/vulnerability/CVE-2025-46802

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-46802/
Summaries are generated and may contain mistakes; the official description above is the record.
