CVE-2023-38336
Critical · 9.8CVSS
9.8
EPSS
2.1%
Published
Jul 14, 2023
CISA due date
—
Cloudanix analysis
A long-outdated file transfer tool on some older systems can be tricked into running attacker commands simply by sending it a specially named file, potentially giving intruders full control of the computer.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
netkit-rcp invokes susystem which passes attacker-controlled filenames directly to /bin/sh without sanitization, enabling arbitrary command execution with the privileges of the rcp process.
Why it matters to the business
Systems still running the unmaintained rsh-client package can be fully compromised by remote attackers, resulting in data theft, ransomware deployment, or use as a foothold for further network attacks; the package has no vendor fixes and remains exploitable years after disclosure.
How an attack unfolds
An attacker crafts a filename containing shell metacharacters and command payloads, then initiates an rcp transfer (or similar netkit-rcp invocation) that causes susystem to expand the filename through /bin/sh, executing the injected commands.
How to fix it
Remove the netkit-rcp and rsh-client packages entirely; replace any remaining rcp/rsh usage with scp, sftp, or rsync over SSH; if removal is impossible, isolate affected systems and block inbound rsh/rcp traffic at network boundaries.
How to confirm the fix worked
Confirm the netkit-rcp binary is absent or its package is removed; attempt a controlled filename injection test in an isolated environment to verify the shell expansion path is no longer reachable.
Typical attack path
- identify hosts exposing rsh/rcp services or containing the netkit-rcp binary
- craft a malicious filename embedding shell commands (e.g., ;id>/tmp/pwned)
- trigger netkit-rcp with the crafted filename via rcp, rsh, or automated scripts
- achieve code execution and establish persistence or lateral movement
How to detect it
Search endpoint and process-creation logs for netkit-rcp or rcp invocations containing shell metacharacters in arguments or filenames; inspect syslog and auditd records for susystem or /bin/sh child processes spawned by rcp; review file-transfer automation logs for unexpected command output or newly created files with suspicious names.
- rcp.*[;&|`$]
- susystem
- netkit-rcp
- /usr/bin/rcp
- rsh-client
What your security team should do
- Immediately uninstall netkit-rcp / rsh-client from all production systems
- Scan package inventories and configuration management databases for any remaining instances
- Block TCP/UDP ports associated with rsh/rcp at network perimeters
- Add the package name to disallowed-software policies and CI/CD blocklists
- Hunt for historical rcp process executions in endpoint telemetry for the past 90 days
The record
netkit-rcp in rsh-client 0.17-24 allows command injection via filenames because /bin/sh is used by susystem, a related issue to CVE-2006-0225, CVE-2019-7283, and CVE-2020-15778.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | netkit-rsh | 0 | No fix |
| Debian:12 | netkit-rsh | 0 | No fix |
| Ubuntu:16.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:18.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:20.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:22.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | netkit-rsh | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | netkit-rsh | 0 | No fix |
Related vulnerabilities
- CVE-2019-7282 In NetKit through 0.17, rcp.c in the rcp client allows remote rsh servers to bypass… Also affects netkit-rsh
- CVE-2026-114575 A flaw has been found in TOTOLINK A950RG 4.1.2cu.5268_B20221104. CWE-77
- CVE-2026-112942 launch-editor allows users to open files with line numbers in editor from Node.js. CWE-77
- CVE-2026-55453 OpenPrinting CUPS is an open source printing system for Linux and other Unix-like… CWE-77
- CVE-2026-102827 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-102826 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-79945 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77
- CVE-2026-79741 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77