CVE-2017-11421 (published 2017-07-18T19:29Z)

gnome-exe-thumbnailer before 0.9.5 is prone to a VBScript Injection when generating thumbnails for MSI files, aka the "Bad Taste" issue. There is a local attack if the victim uses the GNOME Files file manager, and navigates to a directory containing a .msi file with VBScript code in its filename.

Severity: MEDIUM
CVSS v2 base score: 4.6 (AV:L/AC:L/Au:N/C:P/I:P/A:P)
CVSS v3 base score: 7.8, HIGH (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-94
cwe_name: Improper Control of Generation of Code ('Code Injection')
description: The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
extended_description: 
            When a product allows a user's input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the product. Such an alteration could lead to arbitrary code execution.
            Injection problems encompass a wide variety of issues -- all mitigated in very different ways. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.
         
         

Fix information:
repo_url: https://github.com/gnome-exe-thumbnailer/gnome-exe-thumbnailer
commit_details: repo_url: https://github.com/gnome-exe-thumbnailer/gnome-exe-thumbnailer
author: James Lu
author_date: 2017-07-18 07:41:17+08:00
msg: Switch to msitools' msiinfo for ProductVersion fetching

This replaces the insecure VBScript-based parsing, which has issues described at http://news.dieweltistgarnichtso.net/posts/gnome-thumbnailer-msi-fail.html
repository: repo_url: https://github.com/gnome-exe-thumbnailer/gnome-exe-thumbnailer
repo_name: visit repo url
description: visit repo url
repo_language: visit repo url
owner: gnome-exe-thumbnailer
file_changes: filename: gnome-exe-thumbnailer
change_type: ModificationType.MODIFY
diff: @@ -356,25 +356,10 @@ fi
 # Get the version number:
 if [[ ${INPUTFILE##*.} = 'msi' ]]
 then
-	# Look for the ProductVersion property if user has the Microsoft (R) Windows Script Host installed:
-	if which wine && grep -v 'Wine placeholder DLL' $HOME/.wine/drive_c/windows/system32/cscript.exe
+	# Look for the ProductVersion property using msitools' msiinfo if present
+	if which msiinfo
 	then
-		# Workaround wine bug #19799: cscript crashes if you call WScript.Arguments(0)
-		# http://bugs.winehq.org/show_bug.cgi?id=19799
-		<<< "
-			Dim WI, DB, View, Record
-			Set WI = CreateObject(\"WindowsInstaller.Installer\")
-			Set DB = WI.OpenDatabase(\"$INPUTFILE\",0)
-			Set View = DB.OpenView(\"SELECT Value FROM Property WHERE Property = 'ProductVersion'\")
-			View.Execute
-			Wscript.Echo View.Fetch.StringData(1)
-		" iconv -f utf8 -t unicode > $TEMPFILE1.vbs
-
-		VERSION=$(
-			DISPLAY=NONE wine cscript.exe //E:vbs //NoLogo Z:\\tmp\\${TEMPFILE1##*/}.vbs 2>/dev/null \
-			| egrep -o '^[0-9]+\.[0-9]+(\.[0-9][0-9]?)?(beta)?'
-		)
-
+		VERSION=$(msiinfo export "$INPUTFILE" 'Property' | grep 'ProductVersion' | cut -f 2)
 	else
 		# Try to get the version number from extended file properties at least:
 		VERSION=$(

programming_language: Shell