An interesting RCE on a Synack Red Team target!
An authenticated user with configuration-change privileges could edit a Groovy script used at application runtime and restart the application, leading to command execution. The attacker could run commands on the server and read files such as the passwd file.
Published on d4ly.medium.com
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a write-up of a remote code execution finding on a Synack Red Team target. The report does not name the product or the program. What it does describe is an authenticated application that exposes an endpoint for editing configuration files used at application runtime. The privileged user in the test had no operating system access but could make configuration changes through the UI.

Two of the editable files stood out: a .properties file and a .groovy script. The endpoint allowed configuration files used at application runtime to be changed.
Setup
The researcher was onboarded to an authenticated test and was able to log in as a privileged user. That user could change configuration but had no shell or operating system access of their own. SQL injection had been placed out of scope, so the researcher deliberately went looking for an RCE instead, on the basis that RCE reports pay well.
The main tool was Burp, which is how the restart endpoint was eventually noticed. Confirmation came from a callback to the Synack Red Team collaborator server.
Finding it
After some digging, the researcher found an endpoint that allowed configuration files used at application runtime to be changed. There was no upload capability: the files were pre-set and only editable in the UI. The .groovy script was the interesting one, because Groovy can execute commands. A HackTricks article on achieving RCE through a Groovy script in Jenkins gave a way to run commands through such a script.
The catch was that the application had to be restarted before the updated Groovy script would be read and the commands executed. No restart option was visible while clicking through the menu items. After a few minutes of clicking through menus, Burp had populated an endpoint named something like restartApplication. Testing it confirmed that it did restart the application.
Exploitation
Step 1: Edit the Groovy script
Using the configuration endpoint, the researcher modified the pre-set .groovy script, following the approach in the HackTricks article, so that it would execute a command when the application next loaded it. The report does not reproduce the script that was submitted.
Step 2: Restart the application
The restartApplication endpoint found in Burp was used to restart the application, which causes it to read the updated Groovy script. The report does not give the request itself, only the endpoint name as it appeared in Burp.
Step 3: Confirm command execution with curl
With no netcat available, the researcher guessed at which commands the machine would have. curl was present, and a callback to the Synack Red Team collaborator server came back showing the User-Agent as curl. That confirmed command execution on the host.
Step 4: Read the filesystem
The proof was then extended to show filesystem access. After another restart of the application and a long wait, a callback arrived containing the passwd file. The report does not include the command or the callback contents.
Root cause
A privileged user who is only meant to change application configuration can edit a Groovy script that the application executes at runtime. The application treats editing that script as a configuration operation, but the script is code, so the configuration privilege is effectively a code execution privilege. Restarting the application is the trigger that causes the edited script to be loaded and run.
As the researcher notes with hindsight and after peer discussion, this could have been considered intended functionality depending on the user's role, which is why acceptance was arguably fortunate.
Impact
An attacker holding the privileged configuration role can run operating system commands on the application host. In this test that was demonstrated by an outbound curl callback and by reading the passwd file. The precondition is that level of authenticated access plus the ability to restart the application; the report does not assess what a lower-privileged user could do.
Fix
The design issue it points to is that editing a runtime script should not be available to a role that is only meant to change configuration, or that the script should not be executed without stronger controls.
Variants to test
- Look for other runtime-editable script files (
.groovy, and any other scripting format the product loads) in configuration screens, and check whether a restart or reload endpoint exists nearby in the site map. - Try the same pattern on CI/CD products, where Groovy script consoles and job configuration are common, and confirm with an outbound callback.
- Test whether a lower-privileged account can reach the same configuration endpoint, which would remove the privileged-role precondition.
- Check whether the restart endpoint can be triggered by an unauthenticated or lower-privileged request, since it is the step that turns a stored script edit into execution.
What happened, in plain words
A security researcher was testing a web application on a bug bounty platform called Synack. Bug bounty platforms are places where companies invite independent testers to try to break their systems, and pay for the problems they find. The application was one where you have to log in first, and the researcher had been given a special account: a privileged user. That account could not open a terminal on the server or run operating system commands directly. What it could do was change the application's settings through the normal web interface.
One of the settings screens let this user edit configuration files that the application reads while it is running. Two of those files were interesting: a .properties file and a .groovy script. A Groovy script is a small program written in a programming language called Groovy. If an attacker can change a script that the server later runs, they can often make the server run commands of their choosing. That is called remote code execution, or RCE: getting a machine you do not physically control to run code you wrote.
The researcher edited the Groovy script, then needed the application to restart so it would read the new version. A restart option was not visible in the menus, but the tool the researcher was using to watch web traffic, Burp, had recorded an endpoint named something like restartApplication. Calling that endpoint restarted the application. After the restart, the edited script ran, and the researcher confirmed it by making the server send a request back to a server the researcher controlled. Later, the same technique was used to read a file from the server's filesystem, the passwd file.

The report does not name the product or the program. It is a write-up of a remote code execution finding on a Synack Red Team target.
Background you need first
A few ideas come up again and again below, so here they are from zero.
Logging in and roles. Most web applications have accounts, and accounts have roles. A normal user might only be able to view pages; an administrator can change settings. The account in this test was privileged: it could make configuration changes, but it had no operating system access. Think of it like a building manager who can change the heating schedule from a control panel but does not have a key to the server room.
Configuration files. Programs often keep their settings in files rather than hard-coded in the program itself. A .properties file is a common format for simple settings, stored as lines of name=value. A .groovy script is different: it is actual code, written in the Groovy language, which the application can load and run. The endpoint in this report changed configuration files used at application runtime. That is what makes them interesting to an attacker: change the file, and the running application picks up the change.
Endpoints and APIs. An endpoint is a specific address on a web server that does something when it receives a request. When you click a button in a web application, your browser usually sends a request to an endpoint behind the scenes, and the server replies. An API is just the collection of these endpoints and the rules for talking to them. You can think of an endpoint as a service counter: you go to the right counter, hand over a request, and get something back.
Burp and the site map. Burp is a tool that sits between your browser and the web server and records every request and response. As you click around an application, Burp builds a map of all the endpoints your browser has talked to, even ones that are not linked from any visible menu. That map is how the researcher noticed the restart endpoint later.
Callbacks and the collaborator server. To prove that a server will run your command, a common trick is to make it contact a server you control. If your server receives that contact, you know the command ran. Synack provides a collaborator server for exactly this purpose during tests. The request that arrives at your server carries details such as the User-Agent, a label the requesting client software sends to identify itself. If the User-Agent says curl, the request was made by the curl command-line tool.
curl and netcat. curl is a small program for making web requests from a command line. netcat is a similar utility often used to open network connections. The researcher did not have netcat on the target, but did have curl.
SQL injection and scope. SQL injection is a different class of bug where user input is mixed into database queries. The program had placed SQL injection out of scope, meaning testers were not allowed to report it. So the researcher deliberately looked for RCE instead, partly because RCE findings tend to pay well on bounty programmes.
Setting up
The researcher was onboarded to an authenticated test, meaning the program gave them an account to log in with, and that account was a privileged user. The account could change configuration but had no shell or operating system access of its own. With SQL injection out of scope, the goal was RCE.
The main tool was Burp, which is how the restart endpoint was eventually noticed. Confirmation came from a callback to the Synack Red Team collaborator server.
Finding it
After some digging, the researcher found an endpoint that allowed configuration files used at application runtime to be changed. There was no upload capability: the files were pre-set and only editable in the UI. In other words, you could not drop in a file of your own; you could only open one of the existing files in the web interface and change its contents.
The .groovy script was the interesting one, because Groovy can execute commands. A HackTricks article on achieving RCE through a Groovy script in Jenkins gave a way to run commands through such a script. HackTricks is a public collection of security notes; Jenkins is a well-known automation server that also uses Groovy, which is why its example was relevant.
The catch was that the application had to be restarted before the updated Groovy script would be read and the commands executed. No restart option was visible while clicking through the menu items. After a few minutes of clicking through menus, Burp had populated an endpoint named something like restartApplication. Testing it confirmed that it did restart the application.
Exploitation
Step 1: Edit the Groovy script
Using the configuration endpoint, the researcher modified the pre-set .groovy script, following the approach in the HackTricks article, so that it would execute a command when the application next loaded it. The report does not reproduce the script that was submitted.
Why this step: the configuration screen was the only place the privileged account could write something the server would later execute. Editing the script is like leaving a note in a drawer that you know the manager will read and act on when they next open it.
Step 2: Restart the application
The restartApplication endpoint found in Burp was used to restart the application, which causes it to read the updated Groovy script. The report does not give the request itself, only the endpoint name as it appeared in Burp.
Why this step: a running application may keep the old version of a file in memory. A restart forces it to load the file again, which is the moment the edited script runs. Without the restart, the edit would just sit there.
Step 3: Confirm command execution with curl
With no netcat available, the researcher guessed at which commands the machine would have. curl was present, and a callback to the Synack Red Team collaborator server came back showing the User-Agent as curl. That confirmed command execution on the host.
Why this step: a callback is proof. Anyone can claim a command ran; a request arriving at a server you control, carrying the User-Agent of the tool you asked the target to run, shows that the target really executed it.
Step 4: Read the filesystem
After another restart of the application and a long wait, a callback arrived containing the passwd file. The report does not include the command or the callback contents.
Why this step: running a command proves code execution, but reading a file proves the attacker can reach data on the server's disk. The passwd file is a standard file on Unix-like systems that lists user accounts. Reading it is a common, harmless way to demonstrate filesystem access.
Root cause
A privileged user who is only meant to change application configuration can edit a Groovy script that the application executes at runtime. The application treats editing that script as a configuration operation, but the script is code, so the configuration privilege is effectively a code execution privilege. Restarting the application is the trigger that causes the edited script to be loaded and run.
As the researcher notes with hindsight and after peer discussion, this could have been considered intended functionality depending on the user's role, which is why acceptance was arguably fortunate.
Impact
An attacker holding the privileged configuration role can run operating system commands on the application host. In this test that was demonstrated by an outbound curl callback and by reading the passwd file. The precondition is that level of authenticated access plus the ability to restart the application; the report does not assess what a lower-privileged user could do.
Fix
The design issue it points to is that editing a runtime script should not be available to a role that is only meant to change configuration, or that the script should not be executed without stronger controls.
Variants to test
- Look for other runtime-editable script files (
.groovy, and any other scripting format the product loads) in configuration screens, and check whether a restart or reload endpoint exists nearby in the site map. - Try the same pattern on CI/CD products, where Groovy script consoles and job configuration are common, and confirm with an outbound callback.
- Test whether a lower-privileged account can reach the same configuration endpoint, which would remove the privileged-role precondition.
- Check whether the restart endpoint can be triggered by an unauthenticated or lower-privileged request, since it is the step that turns a stored script edit into execution.
Glossary
- API: the set of endpoints and rules a program exposes so other software (or a browser) can talk to it.
- Authenticated test: a security test where the tester is given a working account to log in with.
- Bug bounty: a programme where a company pays independent researchers for reporting security problems.
- Burp: a tool that records and lets you inspect the web traffic between your browser and a server, and builds a map of endpoints.
- Callback: a request that the target server makes to a server the researcher controls, used as proof that a command ran.
- Collaborator server: a server provided by the testing platform to receive and log such callbacks.
- Configuration file: a file holding settings that a program reads, often while it is running.
- curl: a command-line program for making web requests.
- Endpoint: a specific address on a server that performs an action when it receives a request.
- Groovy: a programming language that runs on the Java platform and can execute commands.
- HackTricks: a public collection of security notes and techniques.
- Jenkins: an automation server that uses Groovy scripts, used here as a source of example techniques.
- netcat: a command-line utility for opening network connections.
- passwd file: a standard file on Unix-like systems listing user accounts.
- Privileged user: an account with extra permissions, such as the ability to change settings.
.propertiesfile: a simple text format for settings, stored asname=valuelines.- RCE (remote code execution): making a machine you do not control run code or commands you choose.
- Restart: stopping and starting an application so it reloads its files and settings.
- Runtime: the period while a program is actually running, as opposed to when it is installed.
- Scope: the list of targets and bug types a programme allows testers to work on.
- SQL injection: a bug where user input is mixed into database queries so the attacker can change them.
- Synack Red Team: the group of researchers testing on the Synack platform.
- UI: the user interface, the screens and buttons a person uses in a browser.
- User-Agent: a label that client software sends with a web request to identify itself, such as
curl.