Skip to content
Threat Feed
critical advisory

PhreeBooks ERP 5.2.3 Remote Code Execution Vulnerability

PhreeBooks ERP 5.2.3 is vulnerable to remote code execution, allowing authenticated attackers to upload and execute arbitrary PHP files via the image manager, leading to reverse shell connections and system command execution.

PhreeBooks ERP version 5.2.3 is susceptible to a remote code execution (RCE) vulnerability (CVE-2019-25647) within its image manager component. This flaw enables authenticated attackers to bypass file extension restrictions and upload malicious PHP files. Successful exploitation allows attackers to execute arbitrary code on the underlying server, potentially leading to complete system compromise. The vulnerability exists because the image manager lacks adequate validation of uploaded file types, permitting the upload of PHP files disguised with allowed extensions or lacking extensions altogether. This can lead to reverse shell creation.

Attack Chain

  1. An attacker authenticates to the PhreeBooks ERP 5.2.3 application.
  2. The attacker accesses the image manager functionality.
  3. The attacker crafts a malicious PHP file designed to execute system commands or establish a reverse shell.
  4. The attacker uploads the malicious PHP file through the image manager, bypassing file extension validation. This may involve renaming the file with a permitted extension or omitting the extension entirely.
  5. The attacker identifies the upload location of the malicious PHP file.
  6. The attacker sends an HTTP request to the uploaded PHP file’s location on the server.
  7. The web server executes the PHP code, triggering the attacker’s malicious payload (e.g., reverse shell).
  8. The attacker gains remote access to the server and can execute arbitrary system commands.

Impact

Successful exploitation of this vulnerability allows a remote attacker to execute arbitrary code on the targeted server. This can lead to complete system compromise, including data theft, modification, or destruction. Given that PhreeBooks ERP is used to manage business operations, a successful attack could result in significant financial losses, disruption of services, and reputational damage. There is no specific information about victim count or sectors targeted available from the source.

Recommendation

  • Apply any available patches or updates for PhreeBooks ERP to address CVE-2019-25647.
  • Implement the Sigma rule “Detect Suspicious PHP Upload via Image Manager” to detect attempts to upload malicious PHP files through the image manager.
  • Monitor web server logs for requests to unusual file paths containing PHP code, as this could indicate exploitation attempts.
  • Restrict access to the image manager functionality to only authorized users.

Detection coverage 2

Detect Suspicious PHP Upload via Image Manager

high

Detects attempts to upload PHP files through the image manager by monitoring POST requests with PHP content.

sigma tactics: initial_access, persistence techniques: T1189, T1505.003 sources: webserver, linux

Detect PHP execution from unusual web paths

medium

Detects PHP execution from unusual web paths, indicating potential RCE exploitation

sigma tactics: execution techniques: T1059.001 sources: webserver, linux

Detection queries are kept inside the platform. Get full rules →