Summary
Gladys Assistant's Backup Restore Endpoint is affected by an OS command injection vulnerability involving the file_url argument. If the endpoint is reachable and handles that input unsafely, a remote attacker may be able to execute operating-system commands.
Affected context
The issue is reported in Gladys Assistant versions up to 4.71.0 and concerns the Backup Restore Endpoint, in gateway.downloadBackup.js. It becomes risky when the endpoint accepts a file_url value that can influence operating-system command construction without adequate safeguards. The description does not specify whether authentication is required or how the endpoint is exposed in a particular deployment.
Exploit preconditions
- Attack surface: The Backup Restore Endpoint must be reachable by the attacker.
- Required access: The vulnerability is described as remotely initiable; authentication requirements are not specified.
- Trigger point: Handling of the
file_urlargument in the backup download flow. - Why exploitation is possible: The argument may affect an operating-system command if it is incorporated into command execution without safe handling.
Why this happens
The reported flaw is command injection associated with the file_url argument. If externally influenced data is assembled into an operating-system command and interpreted as command syntax, the application may execute unintended commands. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command and is also related to CWE-77: Improper Neutralization of Special Elements used in a Command.
Potential impact
- An attacker may execute commands with the privileges of the Gladys Assistant process.
- The host or application environment could be compromised.
- Data accessible to the application may be exposed, altered, or deleted.
- A compromised instance may be used to affect connected systems, depending on its permissions and network access.
General mitigation guidance
Defensive patterns focus on avoiding shell interpretation of externally influenced values and reducing the trust placed in request data.
- Prefer APIs that pass arguments directly to a process without invoking a shell; where possible, avoid operating-system command execution entirely.
- Treat
file_urland similar inputs as untrusted, validate them against a narrowly defined schema, and avoid relying on filtering alone. - Restrict permitted URL schemes, destinations, and file locations according to the feature's intended behavior.
- Run the application with least privilege and limit its access to files, processes, and networks.
- Apply access controls to backup operations and keep sensitive endpoints limited to intended users and networks.
How teams detect issues like this
- Use static analysis to identify shell or process execution APIs that receive request-derived values.
- Review code paths from endpoint parameters to command construction, including helpers and wrappers.
- Check that process invocation avoids shell parsing and that input validation is enforced at the appropriate boundary.
- Use policy checks to flag shell execution with untrusted data and require security review for exceptions.
- Monitor endpoint activity and host process launches for unexpected command execution patterns.

