/

CVE-2026-119409

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in OPNsense Firmware Updater

CVE-2026-119409

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Root-Level Command Execution and Package Verification Bypass

Severity:

HIGH RISK

(7.2)

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

OPNsense versions before 26.7.8 contain a command injection vulnerability in firmware mirror handling. An authenticated user with the System: Firmware privilege may provide shell metacharacters that can be evaluated as root, and may also interfere with package signature verification.

OPNsense versions before 26.7.8 contain a command injection vulnerability in firmware mirror handling. An authenticated user with the System: Firmware privilege may provide shell metacharacters that can be evaluated as root, and may also interfere with package signature verification.

Affected context

The issue occurs in OPNsense firmware management workflows that accept a firmware mirror URL through the firmware API and later process that value in shell commands. Risk is higher when an authenticated account has the System: Firmware privilege and the affected update logic evaluates user-controlled data without adequate command separation or validation.

The issue occurs in OPNsense firmware management workflows that accept a firmware mirror URL through the firmware API and later process that value in shell commands. Risk is higher when an authenticated account has the System: Firmware privilege and the affected update logic evaluates user-controlled data without adequate command separation or validation.

Exploit preconditions

  • Attack surface: Firmware management API, including POST /api/core/firmware/set
  • Required access: An authenticated account with the System: Firmware privilege
  • Trigger point: Processing the stored firmware mirror URL during firmware or package operations
  • Why exploitation is possible: User-controlled URL data reaches shell evaluation logic, allowing shell metacharacters to alter command behavior; related input handling may also permit modification of package signature verification settings
  • Attack surface: Firmware management API, including POST /api/core/firmware/set
  • Required access: An authenticated account with the System: Firmware privilege
  • Trigger point: Processing the stored firmware mirror URL during firmware or package operations
  • Why exploitation is possible: User-controlled URL data reaches shell evaluation logic, allowing shell metacharacters to alter command behavior; related input handling may also permit modification of package signature verification settings

Why this happens

The vulnerability results from incorporating user-controlled firmware mirror data into shell evaluation through eval rather than treating it strictly as data. Shell metacharacters can therefore change the intended command structure and cause additional commands to execute with the service's privileges. This behavior maps to CWE-78, Improper Neutralization of Special Elements used in an OS Command, and the associated configuration manipulation can weaken package authenticity checks.

The vulnerability results from incorporating user-controlled firmware mirror data into shell evaluation through eval rather than treating it strictly as data. Shell metacharacters can therefore change the intended command structure and cause additional commands to execute with the service's privileges. This behavior maps to CWE-78, Improper Neutralization of Special Elements used in an OS Command, and the associated configuration manipulation can weaken package authenticity checks.

Potential impact

  • An attacker may execute arbitrary operating-system commands as root
  • The system could be fully compromised
  • Package signature verification may be disabled or weakened
  • Malicious or tampered packages could be installed
  • System configuration, credentials, or managed network services could be exposed
  • The compromised appliance could be used for further network intrusion
  • An attacker may execute arbitrary operating-system commands as root
  • The system could be fully compromised
  • Package signature verification may be disabled or weakened
  • Malicious or tampered packages could be installed
  • System configuration, credentials, or managed network services could be exposed
  • The compromised appliance could be used for further network intrusion

General mitigation guidance

Mitigation generally focuses on removing shell evaluation from firmware

management paths and reducing trust in user-provided mirror values.

Common defensive patterns include:

  • Passing arguments through structured process-execution APIs rather than shell evaluation
  • Allowing only validated, canonical mirror URL schemes, hosts, and paths
  • Applying strict allowlists and rejecting shell metacharacters where URLs are accepted
  • Preserving package signature verification as a protected, secure-by-default control
  • Separating firmware mirror configuration from security-sensitive verification settings
  • Limiting the System: Firmware privilege to narrowly trusted administrators
  • Running update-related processes with the minimum privileges required
  • Recording and reviewing firmware configuration changes and package verification events

Mitigation generally focuses on removing shell evaluation from firmware

management paths and reducing trust in user-provided mirror values.

Common defensive patterns include:

  • Passing arguments through structured process-execution APIs rather than shell evaluation
  • Allowing only validated, canonical mirror URL schemes, hosts, and paths
  • Applying strict allowlists and rejecting shell metacharacters where URLs are accepted
  • Preserving package signature verification as a protected, secure-by-default control
  • Separating firmware mirror configuration from security-sensitive verification settings
  • Limiting the System: Firmware privilege to narrowly trusted administrators
  • Running update-related processes with the minimum privileges required
  • Recording and reviewing firmware configuration changes and package verification events

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules identifying eval, shell interpolation, and command construction from request or configuration values
  • Code review checks for API parameters flowing into shell commands without structured argument handling
  • Tests using metacharacter-like input to verify that values remain data rather than executable syntax
  • Policy enforcement that blocks unsafe shell APIs in privileged management components
  • Monitoring firmware mirror changes, signature-verification changes, unexpected update commands, and root-level process activity
  • Automated security review tools that identify command injection data flows and unsafe configuration handling

Detection approaches can include:

  • Static analysis rules identifying eval, shell interpolation, and command construction from request or configuration values
  • Code review checks for API parameters flowing into shell commands without structured argument handling
  • Tests using metacharacter-like input to verify that values remain data rather than executable syntax
  • Policy enforcement that blocks unsafe shell APIs in privileged management components
  • Monitoring firmware mirror changes, signature-verification changes, unexpected update commands, and root-level process activity
  • Automated security review tools that identify command injection data flows and unsafe configuration handling

Sources

SourceLink
abraxaslabs.techabraxaslabs.tech/research/opnsense-firmware-mirror-sed
github.comgithub.com/opnsense/core
github.comgithub.com/opnsense/core/commit/1cc41fc39da99d59818c789b3b561f1515126f47
github.comgithub.com/opnsense/core/commit/8e214533d33c3af7481e86f616ee615adc6a0a73
github.comgithub.com/opnsense/core/security/advisories/GHSA-p683-f7x2-pm4p
github.comgithub.com/opnsense/update/blob/a2b8a10ba85f13b2cd002abb4c8692dde99f0261/src/update/opnsense-update.sh.in#L165
github.comgithub.com/opnsense/update/commit/9bfd3b7020499b6032ee64804193a9f3ce8178fa
vulncheck.comvulncheck.com/advisories/opnsense-before-26.7.8-root-command-injection-via-firmware-mirror-setting

Frequently asked

questions

It may be exploitable through the management interface when that interface is

reachable by an attacker who has valid credentials with the required firmware

privilege. It is not an unauthenticated attack based on the stated conditions.

Exploitation requires authentication and the System: Firmware privilege. The

key security boundary is whether the user can submit or alter the firmware

mirror configuration.

Eliminate shell evaluation for user-controlled values, use structured process

execution with separate arguments, validate mirror URLs against a strict

allowlist, and keep package signature verification enabled by default.

Apply least privilege, review privileged API parameters for shell data flows,

enforce secure coding rules against eval, and monitor changes to firmware

sources and package verification controls.

It may be exploitable through the management interface when that interface is

reachable by an attacker who has valid credentials with the required firmware

privilege. It is not an unauthenticated attack based on the stated conditions.

Exploitation requires authentication and the System: Firmware privilege. The

key security boundary is whether the user can submit or alter the firmware

mirror configuration.

Eliminate shell evaluation for user-controlled values, use structured process

execution with separate arguments, validate mirror URLs against a strict

allowlist, and keep package signature verification enabled by default.

Apply least privilege, review privileged API parameters for shell data flows,

enforce secure coding rules against eval, and monitor changes to firmware

sources and package verification controls.

Find out what's already
exploitable in your codebase.