Description
distcc 2.x, as used in XCode 1.5 and others, when not configured to restrict access to the server port, allows remote attackers to execute arbitrary commands via compilation jobs, which are executed by the server without authorization checks.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | distcc | 2.18.1-1 | — |
| Debian 13 | distcc | 2.18.1-1 | — |
| Debian 12 | distcc | 2.18.1-1 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
DistCC Daemon Command Execution
exploit/unix/misc/distcc_exec
Exploit-DB 1
- DistCC Daemon - Command Execution (Metasploit) EDB-9915 · remote · Feb 1, 2002 · verified
GitHub 7 repositories
-
h3x0v3rl0rd/distccd_rce_CVE-2004-2687 ★ 2 · Jul 1, 2021
-
germarr93/CyberSecurity-Pentest-Lab ★ 1 · Sep 11, 2026
CVE-2004-2687 (Distcc 3.2.1) exploitation, methodology & remediation — Metasploitable2 lab
-
k4miyo/CVE-2004-2687 ★ 1 · Aug 28, 2021
CVE-2004-2687 DistCC Daemon Command Execution
-
ocfagb/hacktivity-vulns-exploits-lab ★ 0 · Aug 27, 2026
Writeup + CVE analysis + countermeasures for the Hacktivity 'Vulnerabilities, Exploits, and Remote Access Payloads' lab (netcat shells, Metasploit, CVE-2010-1240, CVE-2004-2687).
-
aish19siddiqua-commits/mtechweek_04 ★ 0 · Aug 22, 2026
Metasploit-based penetration test on an isolated Metasploitable2 lab VM — remote exploitation via DistCC (CVE-2004-2687), privilege escalation via udev netlink (CVE-2009-1185), and vsftpd 2.3.4 backd…
-
micheaol/distccd_rce_CVE-2004-2687 ★ 0 · Apr 20, 2026
-
nulltrace1336/Metasploitable-2-Distcc-Exploit-via-Kali-Linux-CVE-2004-2687 ★ 0 · Dec 23, 2025
Ushbu videoda Metasploitable 2 tizimidagi distccd servisidagi zaiflikdan foydalanib, Kali Linux orqali remote shell olish ko‘rsatib beriladi.
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Distccd v1 - Remote Code Execution network/cves/2004/CVE-2004-2687.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
References
- 20050310 XCode 1.5 and distcc 2.x Exploit mailing-list
- 13378 vdb-entry
- [distcc] 20040826 Exploit in distcc ( got compromised ;( ) mailing-list
- http://www.metasploit.org/projects/Framework/exploits.html#distcc_exec
- http://distcc.samba.org/security.html
- [distcc] 20040826 Exploit in distcc ( got compromised ;( ) mailing-list