Executive brief
Nginx Proxy Manager, a tool for managing Nginx proxy settings via a web interface, is vulnerable to a security flaw that allows an authorized user to take full control of the server. By entering specially crafted text into the DNS provider credentials field, an attacker can force the system to run unauthorized commands. This could lead to the theft of SSL certificates, access to private databases, or a complete takeover of the host system, especially when running in Docker environments.
Technical details
An OS command injection vulnerability exists in the `setupCertbotPlugins()` function within `backend/setup.js` of Nginx Proxy Manager. The vulnerability stems from the improper neutralization of the `dns_provider_credentials` field, which is interpolated directly into a shell command executed via `child_process.exec()`. An attacker with `certificates:manage` permissions can provide a malicious payload that escapes the shell's single-quote wrapping. The injected commands are executed with the privileges of the application (often root in Docker containers) when the backend restarts. The issue was resolved in commit `a5db5ed` by migrating from shell-based command execution to native Node.js `fs` module operations for handling credential files.
Affected products
- Nginx Proxy Manager Nginx Proxy Manager 2.9.14 through 2.15.1
Timeline
- 2026-04-19: disclosed: Initial vulnerability report and PR submitted by researcher
- 2026-06-07: patched: Fix merged into develop branch via commit a5db5ed
- 2026-06-08: advisory: CVE-2026-40519 published