/

CVE-2026-38820

Severity:

HIGH RISK

(8.3)

OS Command Injection (CWE-78) in openNDS Preauth Endpoint

CVE-2026-38820

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Unauthenticated Remote Code Execution

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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 fas query 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 anomalous fas parameter 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

Sources

SourceLink
github.comgithub.com/openNDS/openNDS/commit/8c03750d9a17d601fa7bd03ae7cde20c7c8d1252

Frequently asked

questions

Yes, it may be remotely exploitable when the preauthentication endpoint is reachable over the network and does not require authentication.

The described issue is unauthenticated, so an account should not be required. Network reachability to the affected endpoint remains necessary.

The safest pattern is to avoid shell interpretation for request-derived data, use fixed command arguments, and enforce strict allowlist validation.

Treat all query parameters as untrusted, prohibit unsafe string-based command construction, apply least privilege, and monitor service processes for unexpected command execution.

Find out what's already
exploitable in your codebase.