Summary
A critical OS command injection vulnerability in reNgine allows attacker-controlled content in the custom_headers scan engine configuration field to reach operating system command execution paths.
If an attacker can influence this configuration and trigger the affected scanning functions, they may execute arbitrary commands with the privileges of the reNgine process.
A critical OS command injection vulnerability in reNgine allows attacker-controlled content in the custom_headers scan engine configuration field to reach operating system command execution paths.
If an attacker can influence this configuration and trigger the affected scanning functions, they may execute arbitrary commands with the privileges of the reNgine process.
Affected context
The vulnerability occurs in reNgine scan workflows that process the custom_headers configuration field through the fetch_url and dir_file_fuzz functions in web/reNgine/tasks.py. It becomes risky when untrusted or insufficiently validated configuration data can be supplied to these scan engines and subsequently incorporated into operating system command execution.
The vulnerability occurs in reNgine scan workflows that process the custom_headers configuration field through the fetch_url and dir_file_fuzz functions in web/reNgine/tasks.py. It becomes risky when untrusted or insufficiently validated configuration data can be supplied to these scan engines and subsequently incorporated into operating system command execution.
Exploit preconditions
- Attack surface: reNgine scan engine configuration and task execution
- Required access: Ability to influence the custom_headers configuration, directly or through an exposed workflow or authorized account
- Trigger point: Execution of the fetch_url or dir_file_fuzz scanning functions
- Why exploitation is possible: Configuration data reaches an OS command execution path without sufficient separation between data and shell syntax
- Attack surface: reNgine scan engine configuration and task execution
- Required access: Ability to influence the custom_headers configuration, directly or through an exposed workflow or authorized account
- Trigger point: Execution of the fetch_url or dir_file_fuzz scanning functions
- Why exploitation is possible: Configuration data reaches an OS command execution path without sufficient separation between data and shell syntax
Why this happens
The underlying bug is command construction that allows externally influenced input to be interpreted as part of an operating system command. When values such as custom HTTP headers are concatenated into a shell command or passed through an unsafe command-execution interface, shell metacharacters and other control syntax may alter the intended operation.
This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.
The underlying bug is command construction that allows externally influenced input to be interpreted as part of an operating system command. When values such as custom HTTP headers are concatenated into a shell command or passed through an unsafe command-execution interface, shell metacharacters and other control syntax may alter the intended operation.
This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.
Potential impact
- An attacker may execute arbitrary operating system commands
- The reNgine service or worker process could be compromised
- Sensitive application, scan, or cloud credentials may be exposed
- Attackers could alter scan results or tamper with stored data
- The compromised host could be used for lateral movement or further attacks
- An attacker may execute arbitrary operating system commands
- The reNgine service or worker process could be compromised
- Sensitive application, scan, or cloud credentials may be exposed
- Attackers could alter scan results or tamper with stored data
- The compromised host could be used for lateral movement or further attacks
General mitigation guidance
Mitigation generally focuses on ensuring that configuration values remain data rather than executable command syntax.
Common defensive patterns include:
- Prefer direct process or library APIs over shell invocation
- Pass arguments as structured arrays without shell interpretation
- Apply strict allowlists and schema validation to custom header names and values
- Reject control characters, shell metacharacters, and unexpected delimiters where appropriate
- Keep scan workers and service accounts restricted with least-privilege permissions
- Isolate scanning workloads and limit their access to credentials, filesystems, and network resources
- Treat user-supplied scan configuration as untrusted even when submitted by authenticated users
Mitigation generally focuses on ensuring that configuration values remain data rather than executable command syntax.
Common defensive patterns include:
- Prefer direct process or library APIs over shell invocation
- Pass arguments as structured arrays without shell interpretation
- Apply strict allowlists and schema validation to custom header names and values
- Reject control characters, shell metacharacters, and unexpected delimiters where appropriate
- Keep scan workers and service accounts restricted with least-privilege permissions
- Isolate scanning workloads and limit their access to credentials, filesystems, and network resources
- Treat user-supplied scan configuration as untrusted even when submitted by authenticated users
How teams detect issues like this
Detection can include static analysis for subprocess, shell, command-wrapper, and dynamic command-construction patterns involving configuration fields. Code review should examine whether custom headers or similar scan options are concatenated into commands, passed through shell-enabled execution, or validated only after command construction.
Runtime monitoring can alert on unexpected child processes, shell interpreters, unusual command arguments, and outbound connections initiated by scan workers. CI policy checks can also require structured process execution and block shell-based handling of untrusted configuration. Automated code review tools may help identify these patterns early.
Detection can include static analysis for subprocess, shell, command-wrapper, and dynamic command-construction patterns involving configuration fields. Code review should examine whether custom headers or similar scan options are concatenated into commands, passed through shell-enabled execution, or validated only after command construction.
Runtime monitoring can alert on unexpected child processes, shell interpreters, unusual command arguments, and outbound connections initiated by scan workers. CI policy checks can also require structured process execution and block shell-based handling of untrusted configuration. Automated code review tools may help identify these patterns early.
Sources
| Source | Link |
|---|---|
| github. | github.com/ |
| github. | github.com/ |

