CVE-2023-50254 (published 2023-12-22T17:15Z)

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.

CVSS v3 base score: 7.8, HIGH (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-22
cwe_name: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
description: The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
extended_description: 
            Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.
         
         

Fix information:
repo_url: https://github.com/linuxdeepin/deepin-reader
commit_details: repo_url: https://github.com/linuxdeepin/deepin-reader
author: muyuankai
author_date: 2023-12-19 11:50:22+08:00
msg: fix: change log 6.0.7

change log 6.0.7

Log: change log 6.0.7
repository: repo_url: https://github.com/linuxdeepin/deepin-reader
repo_name: linuxdeepin/deepin-reader
repo_language: C++
owner: linuxdeepin
file_changes: filename: changelog
change_type: ModificationType.MODIFY
diff: @@ -1,3 +1,9 @@
+deepin-reader (6.0.7) unstable; urgency=medium
+
+  * change log 6.0.7.
+
+ -- muyuankai <muyuankai@uniontech.com>  Tue, 19 Dec 2023 11:49:10 +0800
+
 deepin-reader (6.0.6) unstable; urgency=medium
 
   * fix: can not copy

programming_language: Markdown
repo_url: https://github.com/linuxdeepin/deepin-reader
commit_details: repo_url: https://github.com/linuxdeepin/deepin-reader
author: muyuankai
author_date: 2023-12-12 16:18:20+08:00
msg: fix: deal with docx document format

deal with docx document format

Bug: https://pms.uniontech.com/bug-view-232871.html
Log: deal with docx document format
repository: repo_url: https://github.com/linuxdeepin/deepin-reader
repo_name: linuxdeepin/deepin-reader
repo_language: C++
owner: linuxdeepin
file_changes: filename: Model.cpp
change_type: ModificationType.MODIFY
diff: @@ -13,6 +13,7 @@
 #include <QFile>
 #include <QDir>
 #include <QTimer>
+#include <QTemporaryFile>
 
 namespace deepin_reader {
 deepin_reader::Document *deepin_reader::DocumentFactory::getDocument(const int &fileType,
@@ -77,7 +78,10 @@ deepin_reader::Document *deepin_reader::DocumentFactory::getDocument(const int &
             return nullptr;
         }
         qDebug() << "文档解压完成";
-
+        QTemporaryFile tmpFile(convertedFileDir + "/word/" + QCoreApplication::applicationName() + "_XXXXXX.html");
+        if( tmpFile.open()) { //fix 232871
+             tmpHtmlFilePath = tmpFile.fileName(); // returns the unique file name
+         }
         // docx -> html
         QProcess converter;
         *pprocess = &converter;

programming_language: C++