ChestnutCMS Deserialization Vulnerability in API Endpoint Allowing Arbitrary Code Execution

Vulnerability

A critical deserialization vulnerability has been identified in ChestnutCMS versions through 15.1. This issue resides in the API endpoint '/dev-api/groovy/exec', where the application improperly validates Groovy scripts before execution. The vulnerability allows for arbitrary code execution, as the deserialized scripts can be crafted to execute malicious commands on the server. This flaw can be exploited remotely, posing a significant security risk.

Impact

Exploitation of this vulnerability allows for arbitrary code execution on the server where ChestnutCMS is running.

Reproduction

To reproduce this vulnerability, log into the application and navigate to the '/dev-api/groovy/exec' endpoint. Send a POST request with a JSON payload containing a Groovy script that extends the 'BaseGroovyScript' class. The script should be crafted to execute a command and return the output. The response will include the result of the executed command, demonstrating successful exploitation.

Added: Sep 1, 2025, 7:22 PM
Updated: Sep 1, 2025, 7:22 PM

Vulnerability Rating

Custom Algorithm
spread
1.0
impact
7.5
exploitability
6.8
remediation
0.0
relevance
0.2
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.