Traccar is an open source GPS tracking system. Traccar versions 5.1 through 5.12 allow arbitrary files to be uploaded through the device image upload API. Attackers have full control over the file contents, full control over the directory where the file is stored, full control over the file extension, and partial control over the file name. While it's not for an attacker to overwrite an existing file, an attacker can create new files with certain names and attacker-controlled extensions anywhere on the file system. This can potentially lead to remote code execution, XSS, DOS, etc. The default install of Traccar makes this vulnerability more severe. Self-registration is enabled by default, allowing anyone to create an account to exploit this vulnerability. Traccar also runs by default with root/system privileges, allowing files to be placed anywhere on the file system. Version 6.0 contains a fix for the issue. One may also turn off self-registration by default, as that would make most vulnerabilities in the application much harder to exploit by default and reduce the severity considerably.
The attacker uses the API to upload device images (device image upload API), gaining full control over the file content, its extension, and the target directory on the server, as well as partial control over the file name. Although overwriting existing files is not possible, the attacker can create new files with arbitrary extensions in any location of the file system. In the default Traccar installation, the application runs with root/system privileges, enabling file writing to any location. Additionally, self-registration is enabled by default, allowing any anonymous user to create an account and immediately exploit this vulnerability.
An attacker can achieve remote code execution (RCE), conduct XSS attacks, or trigger denial of service (DoS) by placing malicious files anywhere in the server's file system.
Traccar should be updated to version 6.0, which contains a fix for this vulnerability. As additional remedial measures, it is recommended to disable user self-registration and run the application with limited system privileges instead of root/system accounts, which significantly complicates vulnerability exploitation.
Traccar in versions 5.1 through 5.12 (inclusive)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HTraccar
APPTraccar5.1 – 5.12
Related vulnerabilities
Traccar Server – pominięcie uwierzytelnienia przez domyślne dane logowania
Versions of the Traccar open-source GPS tracking system up to and including 6.11.1 contain an issue in which a...
Versions of the Traccar open-source GPS tracking system starting with 6.11.1 contain an issue in which authent...
Versions of the Traccar open-source GPS tracking system up to and including 6.11.1 contain a Cross-Site WebSoc...
Traccar is an open source GPS tracking system. Prior to 5.11, Traccar is affected by an unrestricted file uplo...