OpenProject is an open-source, web-based project management software. Versions prior to 16.6.9, 17.0.6, 17.1.3, and 17.2.1 are vulnerable to an SQL injection attack via a custom field's name. When that custom field was used in a Cost Report, the custom field's name was injected into the SQL query without proper sanitation. This allowed an attacker to execute arbitrary SQL commands during the generation of a Cost Report. As custom fields can only be generated by users with full administrator privileges, the attack surface is somewhat reduced. Together with another bug in the Repositories_module, that used the project identifier without sanitation to generate the checkout path for a git repository in the filesystem, this allowed an attacker to checkout a git repository to an arbitrarily chosen path on the server. If the checkout is done within certain paths within the OpenProject application, upon the next restart of the application, this allows the attacker to inject ruby code into the application. As the project identifier cannot be manually edited to any string containing special characters like dots or slashes, this needs to be changed via the SQL injection described above. Versions 16.6.9, 17.0.6, 17.1.3, and 17.2.1 fix the issue.
The custom field name was injected into an SQL query without proper sanitization during cost report (Cost Report) generation, allowing execution of arbitrary SQL commands. The second vulnerability in the Repositories module involved lack of sanitization of the project identifier when generating the checkout path for a git repository in the file system. By combining both vulnerabilities, an attacker could first use SQL injection to modify the project identifier to contain special characters (e.g., slashes), and then force a git repository checkout to any path on the server. If the repository was cloned to an appropriate path within the OpenProject application, after restart it was possible to inject Ruby code into the application.
An attacker with administrator privileges can execute arbitrary Ruby code on the application server, leading to complete system compromise, including confidentiality, integrity, and availability of data.
OpenProject should be updated to version 16.6.9, 17.0.6, 17.1.3, or 17.2.1, in which both vulnerabilities have been fixed. Until the update is applied, it is recommended to limit the number of accounts with full administrator privileges and monitor cost report generation and repository operations.
OpenProject in versions earlier than 16.6.9, 17.0.6, 17.1.3, and 17.2.1
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:HOpenproject
APPOpenproject17.2.0< 16.6.917.0.0 – 17.0.6 (excl.)17.1.0 – 17.1.3 (excl.)
Related vulnerabilities
SQL Injection w OpenProject — operator =n bez parametryzacji zapytań
Stored XSS w module Repositories aplikacji OpenProject
OpenProject: command injection w endpointcie repozytorium prowadzący do RCE
OpenProject: command injection w endpoincie diff repozytorium (zapis dowolnych plików)
OpenProject — odczyt lokalnych plików przez SVG/ImageMagick przy eksporcie PDF