Summary
C-Kermit before 11.1.515 has an OS command injection vulnerability in the remote WHO and SPACE command handling. A remote client who can supply crafted arguments may cause shell commands to run on the server host, including when DISABLE HOST is set.
Affected context
The issue occurs in C-Kermit's handling of REMOTE WHO and REMOTE SPACE requests. Risk arises when client-supplied arguments are passed unquoted through WHOCMD or SPACM2 to syscmd(), where shell metacharacters may be interpreted by the host shell. The DISABLE HOST setting does not prevent this path from being used.
Exploit preconditions
- Attack surface: C-Kermit's remote command interface
- Required access: Ability to connect as a remote client and submit the relevant requests
- Trigger point: Processing of arguments supplied to
REMOTE WHOorREMOTE SPACE - Why exploitation is possible: Arguments reach
syscmd()without safe separation or quoting, allowing shell metacharacters to alter the command interpreted on the server
Why this happens
The underlying bug is OS command injection, mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command. Client-controlled values are incorporated into commands sent to a system shell without reliably neutralizing shell syntax or avoiding shell interpretation. A setting that disables a separate host-command feature does not address this command-construction path.
Potential impact
- A remote client may execute commands with the privileges of the C-Kermit server process.
- The server host could be compromised or its data accessed or modified.
- The issue could enable disruption of services or further access within the host's environment.
General mitigation guidance
Mitigation generally focuses on removing shell interpretation from request handling and reducing the trust placed in client-supplied arguments.
- Prefer direct, structured process or system APIs that pass arguments separately rather than constructing shell command strings.
- Where shell invocation cannot be avoided, apply context-appropriate validation and escaping, and restrict accepted input to the minimum required.
- Enforce authorization and input validation before performing remote operations.
- Run the service with least privilege and limit its access to sensitive files and host capabilities.
- Do not rely on a host-command disable setting as a substitute for securing every command execution path.
How teams detect issues like this
- Use static analysis to identify client-controlled values flowing into shell execution APIs such as
syscmd(). - Review command construction in remote request handlers, especially for unquoted or concatenated arguments.
- Add tests and code review checks for shell metacharacter handling and ensure remote operations follow explicit authorization policies.
- Use policy checks to flag shell invocation with untrusted input; automated code review tools may help identify these data flows.

