/

CVE-2026-38822

Severity:

HIGH RISK

(7.6)

OS Command Injection (CWE-78) in openNDS Status Page

CVE-2026-38822

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(7.6)

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 uses the client_params.sh script to generate the authenticated client status page, but crafted HTTP query parameter names can be interpreted as shell input. An authenticated captive portal user may exploit this behavior to execute arbitrary operating system commands with the privileges of the openNDS process.

Affected context

The vulnerability occurs in openNDS deployments that use the client_params.sh script when serving the authenticated client status page. It becomes risky when attacker-controlled HTTP query parameter names are passed into shell-processing logic without sufficiently separating data from command syntax.

Exploit preconditions

  • Attack surface: The authenticated captive portal status-page HTTP endpoint
  • Required access: An authenticated captive portal user account or session
  • Trigger point: Processing of crafted query parameter names during status-page generation
  • Why exploitation is possible: Shell metacharacters in attacker-controlled parameter keys may be interpreted as command syntax by the script

Why this happens

The underlying bug is OS command injection caused by treating untrusted HTTP parameter names as shell-interpretable content. When input is incorporated into shell commands without strict separation, validation, or safe argument handling, command syntax can escape the intended data context. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the openNDS process.
  • The captive portal host could be compromised.
  • Network configuration or portal behavior could be altered.
  • Sensitive local data may be accessed or modified.
  • The compromised service could be used to attack adjacent network resources.

General mitigation guidance

Mitigation generally focuses on ensuring that HTTP parameter names and values remain data throughout request processing.

Common defensive patterns include:

  • Avoiding shell evaluation when handling web request data.
  • Using direct process or library APIs with explicit argument arrays instead of command strings.
  • Applying strict allowlists for accepted parameter names and formats.
  • Separating authentication, input validation, and response-generation logic.
  • Running the captive portal service with the minimum privileges and filesystem access required.
  • Restricting access to administrative, host-level, and network-management capabilities from the service account.
  • Treating authenticated users as untrusted for command execution and configuration purposes.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying shell command construction from HTTP parameter names or values.
  • Code review checks for shell evaluation, command substitution, or unquoted request-derived variables.
  • Tests that submit metacharacters in both parameter names and values and verify that they remain inert.
  • Web-server and application logs showing unusual query keys, shell metacharacters, or unexpected child-process creation.
  • Runtime policies that alert when the captive portal process starts shells or executes commands outside an approved set.

Automated security review tools may help identify dangerous data flows from request parsing into shell execution.

Sources

SourceLink
github.comgithub.com/openNDS/openNDS/commit/294983e859bb678eef7db06fc9f6afab0b489d8e

Frequently asked

questions

It can be triggered through the captive portal's HTTP interface, but exploitation generally requires an authenticated captive portal session and network access to the affected endpoint.

No. The described attack requires authenticated captive portal access rather than administrative privileges, although the resulting impact depends on the privileges of the openNDS process.

The safest pattern is to eliminate shell interpretation for request-derived data and use strict allowlists plus direct APIs that pass arguments without invoking a shell.

Treat all client-controlled parameter names and values as untrusted, review data flows into shell execution, apply least privilege, and enforce automated static-analysis and runtime execution policies.

Find out what's already
exploitable in your codebase.