CVE-2026-82412: ntopng: Remote Code Execution via OS Command Injection in Vulnerability-Scan REST API
ntopng is a web-based network traffic monitoring application. Prior to 6.7.260717, the vulnerability-scan endpoints scripts/lua/rest/v2/add/host/toscan.lua and scripts/lua/rest/v2/exec/host/schedulevulnerabilityscan.lua accept the scanports parameter without an administrator gate and pass it through validateSingleWord, which permits shell metacharacters. scripts/lua/modules/vulnerabilityscan/vsutils.lua then concatenates scanports into an nmap command in nmapscanhost and executes the command through ntop.execCmd or ntop.execCmdAsync and popen. Any authenticated non-admin user can execute operating-system commands as the ntopng process account when nmap is available. Because the endpoints accept GET requests while ntopng's CSRF validation applies to POST request bodies, an attacker can also trigger the command through a logged-in user's browser without possessing ntopng credentials. This issue is fixed in version 6.7.260717.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ntopngto a version that resolves this vulnerability.Fixed in 6.7.260717
Event History
Frequently Asked Questions
Which deployments are exposed?
ntopng deployments prior to 6.7.260717 are exposed when nmap is available. The vulnerable REST endpoints do not require an administrator role, so any authenticated non-admin account can reach them.
What does an attacker need to execute commands?
An attacker can supply shell metacharacters through the scan_ports parameter to cause commands to run as the ntopng process account. They need either an authenticated non-admin ntopng account or a way to induce a logged-in user’s browser to send a GET request to the affected endpoint.
Does CSRF protection prevent browser-based exploitation?
No. The affected endpoints accept GET requests, while ntopng's CSRF validation applies to POST request bodies; an attacker can therefore trigger the request through a logged-in user's browser without having ntopng credentials.
What is the remediation?
Upgrade ntopng to version 6.7.260717, which fixes the issue.