Skip to main content
Vulnerability Database/CVE-2026-71490

CVE-2026-71490: OPNsense Privilege Escalation Vulnerability

CVE-2026-71490 is a privilege escalation flaw in OPNsense firewall that allows users to bypass read-only restrictions and modify configurations. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-71490 Overview

CVE-2026-71490 is an authorization flaw [CWE-863] in OPNsense, a FreeBSD-based firewall and routing platform. The vulnerability affects versions prior to 26.1.11. The OPNsense\Core\ACL::hasPrivilege() function appends directly assigned comma-separated privilege values as a single string, then performs an exact string comparison when checking the user-config-readonly restriction. A user granted both a component write privilege and user-config-readonly as a combined directly-assigned entry can bypass the read-only check. MVC APIs protected by throwReadOnly() then persist configuration changes for that component. Group-assigned privileges are not affected because the group code path already splits comma-separated values correctly.

Critical Impact

An authenticated user with directly assigned privileges can bypass the user-config-readonly restriction and persist configuration changes through MVC APIs, undermining the firewall's read-only access control model.

Affected Products

  • OPNsense versions prior to 26.1.11
  • OPNsense Core ACL component (OPNsense\Core\ACL)
  • MVC API controllers protected by throwReadOnly()

Discovery Timeline

  • 2026-10-15 - CVE-2026-71490 published to the National Vulnerability Database (NVD)
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-71490

Vulnerability Analysis

The flaw is a broken authorization issue [CWE-863] in how OPNsense parses user privileges. When hasPrivilege() iterates over directly assigned <priv> elements for a user, it stores each XML node's string value as a single array entry. If an administrator assigned multiple privileges as a single comma-separated string (for example, component-write,user-config-readonly), the resulting array contains the literal combined string rather than individual tokens.

Subsequent privilege checks use exact string comparison. A lookup for user-config-readonly against the combined value component-write,user-config-readonly returns false. The user then appears to lack the read-only restriction while still holding the component write permission. MVC API endpoints that rely on throwReadOnly() to block persistent changes allow the user to save configuration state for the targeted component.

The equivalent group privilege resolution path already splits comma-separated values before comparison, so group-assigned privileges correctly enforce the restriction.

Root Cause

The root cause is inconsistent parsing between the direct-user and group privilege resolution paths in src/opnsense/mvc/app/models/OPNsense/Core/ACL.php. The direct-user loop performed $privs[] = (string)$priv without splitting on commas, while downstream checks assumed each array entry was a single atomic privilege token.

Attack Vector

An authenticated OPNsense user with directly assigned privileges that include both a component write permission and user-config-readonly in a single combined entry can invoke MVC API endpoints for that component. The throwReadOnly() gate fails to detect the read-only privilege and the API persists the configuration change.

php
// Vulnerable code in src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
foreach ($config->system->children() as $key => $node) {
    if ($key == 'user' && (string)$node->name == $username) {
        foreach ($node->priv as $priv) {
            $privs[] = (string)$priv;        // vulnerable: stores combined string
        }
        $uid = (string)$node->uid;
    }
}

// Patched code (commits e15a884 and f674f4f)
foreach ($node->priv as $priv) {
    $privs = array_merge($privs, array_filter(explode(',', $priv)));
}

Source: OPNsense Commit e15a884

Detection Methods for CVE-2026-71490

Indicators of Compromise

  • Configuration change events in OPNsense audit logs attributed to user accounts that hold the user-config-readonly privilege.
  • MVC API POST, set, or apply requests from accounts expected to be read-only, visible in web server access logs.
  • User records in config.xml where a single <priv> element contains a comma-separated list including user-config-readonly.

Detection Strategies

  • Audit config.xml for <user> entries whose <priv> children contain comma-separated values rather than one privilege per element.
  • Correlate OPNsense configuration history diffs with the acting username and the privilege set assigned to that user.
  • Review API access logs for write-oriented MVC endpoints invoked by accounts flagged as read-only in administrative inventories.

Monitoring Recommendations

  • Forward OPNsense system and web server logs to a centralized log platform and alert on configuration changes by accounts bearing user-config-readonly.
  • Baseline the expected set of users permitted to persist configuration changes and alert on deviations.
  • Monitor the OPNsense upgrade state and alert when firewalls remain on versions prior to 26.1.11.

How to Mitigate CVE-2026-71490

Immediate Actions Required

  • Upgrade OPNsense to version 26.1.11 or later, which contains the fixed hasPrivilege() parser and the new throwNotFullAdmin() guard.
  • Audit all user accounts and remove combined comma-separated <priv> entries, replacing them with discrete privilege assignments.
  • Revoke direct privilege assignments where read-only enforcement is required and migrate those users to groups.

Patch Information

The issue is fixed in OPNsense 26.1.11. The relevant upstream commits are 578e025, e15a884, and f674f4f. See the OPNsense Security Advisory GHSA-p9pr-782r-w2xw for the full vendor description.

The patch replaces the single-string append with array_merge($privs, array_filter(explode(',', $priv))), ensuring each privilege token is evaluated independently. A companion patch in ApiControllerBase.php introduces throwNotFullAdmin() to enforce the page-all privilege on sensitive controllers.

Workarounds

  • Assign privileges through groups rather than directly to users, since the group resolution path correctly splits comma-separated values.
  • Audit config.xml and split any multi-value <priv> entries into individual elements until the upgrade is deployed.
  • Restrict administrative API access to trusted management networks via firewall rules on the OPNsense management interface.
bash
# Identify users whose <priv> elements contain comma-separated values
grep -nE '<priv>[^<]*,[^<]*</priv>' /conf/config.xml

# Confirm the installed OPNsense version
opnsense-version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.