Exploit database

Vulnerability

CVE-2024-55556

Vulnerability details

Score
9.8
Severity
critical

CVSS 3.1 · CISA-ADP

Vector string

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Description

A vulnerability in Crater Invoice allows an unauthenticated attacker with knowledge of the APP_KEY to achieve remote command execution on the server by manipulating the laravel_session cookie, exploiting arbitrary deserialization through the encrypted session data. The exploitation vector of this vulnerability relies on an attacker obtaining Laravel's secret APP_KEY, which would allow them to decrypt and manipulate session cookies (laravel_session) containing serialized data. By altering this data and re-encrypting it with the APP_KEY, the attacker could trigger arbitrary deserialization on the server, potentially leading to remote command execution (RCE). The vulnerability is primarily exploited by accessing an exposed cookie and manipulating it using the secret key to gain malicious access to the server.

CVE Program

Exploit source choices

1 source
InvoiceShelf unauthenticated PHP Deserialization Vulnerability
MSF-linux--http--invoiceshelf_unauth_rce_cve_2024_55556MetasploitLinux,PHP,Unix / remotePreferred

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.

2024-12-13invoiceshelf_unauth_rce_cve_2024_55556.rb