Summary
openNDS before 11.0.0 contains an OS command injection vulnerability in the preauthentication endpoint. An unauthenticated attacker may be able to influence shell commands through the fas query parameter, potentially executing commands with the privileges of the openNDS process.
Affected context
The vulnerability occurs in openNDS deployments that expose the /opennds_preauth/ endpoint and process the fas query parameter through shell logic in libopennds.sh. Risk is higher when the service is reachable by untrusted users and the openNDS process has access to sensitive files, network resources, or elevated operating-system privileges.
Exploit preconditions
- Attack surface: The HTTP-accessible
/opennds_preauth/endpoint - Required access: No authentication may be required when the endpoint is exposed
- Trigger point: Processing of the
fasquery parameter by shell code - Why exploitation is possible: Attacker-controlled input can reach command construction or evaluation without adequate separation from shell syntax
Why this happens
The underlying bug is an OS command injection flaw in shell-based request handling. Untrusted data from the fas query parameter is incorporated into shell command processing without sufficient neutralization, strict validation, or safe argument handling. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where external input can alter the intended command behavior.
Potential impact
- An unauthenticated attacker may execute operating-system commands
- The attacker could read, modify, or delete data accessible to the service
- The vulnerable host may be used for local reconnaissance or lateral movement
- Service availability could be disrupted
- Sensitive network or captive-portal information may be exposed
General mitigation guidance
Mitigation generally focuses on removing shell interpretation from request-processing paths and reducing the trust placed in query parameters.
Common defensive patterns include:
- Passing fixed command arguments through APIs that do not invoke a shell
- Applying strict allowlist validation to expected parameter formats
- Keeping request data separate from executable command structure
- Restricting access to preauthentication endpoints where operationally feasible
- Running openNDS with the minimum required operating-system privileges
- Limiting filesystem, network, and process permissions available to the service
- Applying secure-by-default configuration and isolating captive-portal components
How teams detect issues like this
Organizations can look for command injection risks through:
- Static analysis rules identifying shell execution functions and string concatenation with request parameters
- Code review checks for query data passed to shell scripts, command interpreters, or evaluation constructs
- Runtime monitoring for unexpected child processes spawned by openNDS
- Web and host logs showing unusual requests to
/opennds_preauth/or anomalousfasparameter values - Policy enforcement that prohibits direct shell interpretation of externally supplied values
- Automated security review tools that flag unvalidated input crossing into operating-system command interfaces

