Cloudanix VulnDB

CVE-2023-38336

Critical · 9.8

CVSS

9.8

EPSS

2.1%

Published

Jul 14, 2023

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

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.

Exploit Available
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

  1. identify hosts exposing rsh/rcp services or containing the netkit-rcp binary
  2. craft a malicious filename embedding shell commands (e.g., ;id>/tmp/pwned)
  3. trigger netkit-rcp with the crafted filename via rcp, rsh, or automated scripts
  4. 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