# CVE-2023-50254: Deepin Reader RCE vulnerability due to a design flaw

> Attackers can achieve remote code execution by tricking users into opening a crafted docx file that overwrites shell configuration files.

- **Severity:** Critical 9.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 Dec 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-q9jr-726g-9495, openSUSE-SU-2024:13536-1

## What is CVE-2023-50254?

CVE-2023-50254 is a critical path traversal vulnerability in linuxdeepin developer-center, published on 22 Dec 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Deepin Linux's default document reader `deepin-reader` software suffers from a serious vulnerability in versions prior to 6.0.7 due to a design flaw that leads to remote command execution via crafted docx document. This is a file overwrite vulnerability. Remote code execution (RCE) can be achieved by overwriting files like .bash_rc, .bash_login, etc. RCE will be triggered when the user opens the terminal. Version 6.0.7 contains a patch for the issue.

Weakness: CWE-27 (Path Traversal: 'dir/../../filename'), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2023-50254?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `deepin-reader` | openSUSE:Tumbleweed | All versions | 5.10.23-2.1 |

Products: Deepin Deepin Reader.

## How do I fix CVE-2023-50254?

Apply the vendor's patch.

## Is CVE-2023-50254 being exploited?

There is no known exploitation of CVE-2023-50254 in the wild and no public exploit code.

Public exploit code:

- CVE-2023-50254: PoC Exploit for Deepin-reader RCE that affects unpatched Deepin Linux Desktops. Deepin Linux's default document reader "deepin-reader" software suffers from a serious vulnerability due to a design flaw that leads to Remote Command Execution via crafted docx document. (github_poc): https://github.com/febinrev/deepin-linux_reader_RCE-exploit

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-50254 and fix it if it is affected.

What it is: CVE-2023-50254 is a critical path traversal vulnerability in linuxdeepin developer-center, published on 22 Dec 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-50254 in the wild and no public exploit code.

Affected product: linuxdeepin developer-center. 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-2023-50254/ (Markdown: https://insights.sbomify.com/CVE-2023-50254/index.md)
```

## Sources

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

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