MODULE

InvoiceShelf unauthenticated PHP Deserialization Vulnerability

Try Surface Command Get a continuous 360° view of your attack surface
Back to Search

InvoiceShelf unauthenticated PHP Deserialization Vulnerability

Disclosed
12/13/2024
Created
03/14/2025

Description

InvoiceShelf is an open-source web & mobile app that helps you track expenses, payments, create professional invoices & estimates and is based on the PHP framework Laravel. InvoiceShelf has a Remote Code Execution vulnerability that allows remote unauthenticated attackers to conduct PHP deserialization attacks. This is possible when the `SESSION_DRIVER=cookie` option is set on the default InvoiceShelf .env file meaning that any session will be stored as a ciphered value inside a cookie. These sessions are made from a specially crafted JSON containing serialized data which is then ciphered using Laravel's encrypt() function. An attacker in possession of the `APP_KEY` would therefore be able to retrieve the cookie, uncipher it and modify the serialized data in order to get arbitrary deserialization on the affected server, allowing them to achieve remote command execution. InvoiceShelf version `1.3.0` and lower is vulnerable. As it allows remote code execution, adversaries could exploit this flaw to execute arbitrary commands, potentially resulting in complete system compromise, data exfiltration, or unauthorized access to sensitive information.

Author(s)

  • h00die-gr3y <h00die.gr3y@gmail.com>
  • Rémi Matasse
  • Mickaël Benassouli

Platform

Linux,PHP,Unix

Architectures

php, cmd

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/invoiceshelf_unauth_rce_cve_2024_55556
msf exploit(invoiceshelf_unauth_rce_cve_2024_55556) > show targets
    ...targets...
msf exploit(invoiceshelf_unauth_rce_cve_2024_55556) > set TARGET < target-id >
msf exploit(invoiceshelf_unauth_rce_cve_2024_55556) > show options
    ...show and set options...
msf exploit(invoiceshelf_unauth_rce_cve_2024_55556) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;