CVE-2026-58393: OPNsense: OpenVPN Client Specific Override common_name allows path traversal in generated CSO files
OPNsense is a FreeBSD based firewall and routing platform. Prior to version 26.1.11, the OpenVPN Client Specific Override commonname field accepts path traversal sequences and openvpncscconfwrite() concatenates the value into /var/etc/openvpn-csc/<vpnid>/<commonname> without normalization or a basename check. The affected event handlers are clientconnect.php and userpassverify.php. An authenticated user with Client Specific Override privileges can store the traversal value, and a matching OpenVPN client-connect or authentication event causes a generated CSO file to be written outside the intended directory. The file content is generated OpenVPN configuration rather than arbitrary bytes, and practical exploitation requires the attacker to cause a matching common name or username to be processed. This issue is fixed in version 26.1.11.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OPNsenseto a version that resolves this vulnerability.Fixed in 26.1.11
Event History
Frequently Asked Questions
Which deployments are affected?
OPNsense versions prior to 26.1.11 are affected where an authenticated user has Client Specific Override privileges. Exploitation also depends on a matching OpenVPN client-connect or authentication event being processed.
What access and conditions does an attacker need?
The attacker needs authenticated access with permission to create or modify a Client Specific Override and must supply a traversal sequence in its common_name field. They must then cause a matching common name or username to be handled by the affected OpenVPN event handlers.
What is written outside the intended directory?
The issue can cause a generated OpenVPN Client Specific Override configuration file to be written outside /var/etc/openvpn-csc/<vpnid>/. The attacker cannot write arbitrary bytes; the written content is generated OpenVPN configuration.
How can the issue be remediated?
Upgrade OPNsense to version 26.1.11. If an immediate upgrade is not possible, restrict Client Specific Override privileges to trusted administrators and review existing override common_name values for path traversal sequences.