Service:
nrpe
Protocol:
TCPPort:
5666Used for:
Nagios Remote Plugin Executor for system monitoringWhy It’s Open
Port 5666 is used by Nagios Remote Plugin Executor (NRPE) to allow Nagios monitoring servers to execute health checks and monitoring commands on remote systems. It’s a critical component in centralized monitoring setups, where the Nagios server needs access to CPU, memory, disk, and service status on multiple hosts.
The NRPE daemon listens on port 5666 for incoming requests and executes predefined commands listed in the local nrpe.cfg. It’s widely deployed in enterprise monitoring, especially in Linux environments.
Common Risks
- Unauthorized Command Execution
Attackers can exploit NRPE to run arbitrary commands on target systems. - Information Disclosure
Exposed NRPE services may leak system metrics and internal configuration. - Man-in-the-Middle Attacks
If SSL/TLS is not enforced, monitoring data may be intercepted or altered. - Version-specific Vulnerabilities
Older NRPE versions have known security flaws and weak defaults. - Command Injection
Poorly constructed NRPE command definitions could allow injection. - Authentication Bypass
NRPE may lack proper verification if not configured with certificates. - SSL/TLS Weaknesses
Misconfigured cryptographic settings can be exploited. - Privilege Escalation
Certain NRPE commands may be misconfigured to run as privileged users. - Unrestricted Source Access
Lack of IP-based access control allows anyone to query the service.
Want to save time on reporting?
Let PentestPad generate, track, and export your reports - automatically.

Enumeration & Testing
Basic port scan:
nmap -sV -p 5666Test NRPE connection:
check_nrpe -HVersion detection:
check_nrpe -H -VList allowed commands:
check_nrpe -H -nWhat to Look For
| Checkpoint | What it means |
|---|---|
| Unencrypted NRPE traffic | Monitoring data can be intercepted |
| Outdated NRPE version | Contains known exploits or insecure defaults |
| Weak command restrictions | May allow execution of arbitrary system commands |
| Missing SSL/TLS | Data transmitted in plaintext |
| Unrestricted source IPs | Exposed to unauthorized external access |
Mitigation
- Enable SSL/TLS
Ensure all NRPE communications are encrypted with valid certificates. - Version Control
Keep NRPE and its plugins up-to-date to avoid known vulnerabilities. - Command Restriction
Define only safe and specific commands in thenrpe.cfgfile. - Access Controls
Limit access to authorized Nagios servers via firewall andallowed_hosts. - Strong Authentication
Use SSL certificate verification for secure client identification. - Source IP Restriction
Avoid exposing NRPE to the internet; restrict access to trusted IPs. - Regular Audits
Periodically review command definitions and log files for abuse.
TL;DR
- Port 5666 = NRPE for remote monitoring
- Enables Nagios checks on remote hosts
- Requires SSL/TLS encryption
- Must restrict allowed commands and IPs
- Keep software patched and configs tight
Known CVEs and Exploits
- CVE-2013-1362 – Buffer overflow in NRPE < 2.14
- CVE-2014-2913 – Command injection via crafted NRPE packets
- CVE-2017-2904 – SSL certificate verification bypass
- CVE-2020-6581 – Arbitrary file read via configuration mishandling
- Tools like
check_nrpe,nmap, andmetasploitcan assist in NRPE enumeration and testing