Unrestricted Upload of File with Dangerous Type Affecting org.traccar:traccar package, versions [,6.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Unrestricted Upload of File with Dangerous Type vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGTRACCAR-6596005
  • published11 Apr 2024
  • disclosed10 Apr 2024
  • creditnvn1729

Introduced: 10 Apr 2024

CVE-2024-31214  (opens in a new tab)
CWE-434  (opens in a new tab)

How to fix?

Upgrade org.traccar:traccar to version 6.0 or higher.

Overview

Affected versions of this package are vulnerable to Unrestricted Upload of File with Dangerous Type via 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 possible for an attacker to overwrite an existing file, they can create new files with certain names and attacker-controlled extensions anywhere on the file system. This can potentially lead to various attacks including but not limited to remote code execution, cross-site scripting (XSS), denial of service (DoS), among others. The default install of the software makes this vulnerability more severe. Self-registration is enabled by default, allowing anyone to create an account to exploit this vulnerability. Additionally, the software runs by default with root/system privileges, allowing files to be placed anywhere on the file system.

Workaround

This vulnerability can be mitigated by turning 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.

CVSS Scores

version 3.1