# CVE-2026-45158: OPNsense command injection in DHCP interface configuration

Source: https://junglewise.ai/threats/cve-2026-45158-opnsense-command-injection-in-dhcp-interface-configuration  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-13. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-45158 · Severity: critical · CVSS 9.1 · Published 2026-05-13

OPNsense is an open-source firewall and routing platform used to secure corporate and home networks. A security flaw in how the system handles DHCP configuration allows an administrative user to inject malicious commands into the underlying operating system. If exploited, an attacker could gain full control over the firewall, potentially leading to data interception, network disruption, or unauthorized access to the internal network.

Technologies: [OPNsense](https://junglewise.ai/threats/technologies/opnsense). Vendors: [OPNsense](https://junglewise.ai/threats/vendors/opnsense).

## Quick answers

**Is CVE-2026-45158 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45158 being exploited in the wild.

**How severe is CVE-2026-45158?** Critical severity, with a CVSS score of 9.1, published 13 May 2026.

**Which products and versions are affected?** OPNsense < 26.1.8.

**Is there a fix for CVE-2026-45158?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-45158 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-45158?** Check whether you run OPNsense at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A command injection vulnerability exists in OPNsense versions prior to 26.1.8 within the DHCP interface configuration logic. The 'interface_dhcp_configure' function in 'src/etc/inc/interfaces.inc' fails to sanitize user-supplied input, such as the 'dhcphostname' or media parameters, before writing them to the dhclient configuration file. When the system executes the 'dhclient-script' shell script, these unsanitized values are processed in an 'eval' statement, leading to argument injection (CWE-88). An attacker with 'page-interfaces' privileges can exploit this to execute arbitrary commands as the root user. The issue is resolved in version 26.1.8.

## Affected products

- OPNsense OPNsense < 26.1.8

## Timeline

- 2026-05-12: advisory: Vendor advisory published via GitHub
- 2026-05-13: disclosed: NVD publication date

## References

- [https://github.com/opnsense/core/security/advisories/GHSA-5rx3-w735-74wm](https://github.com/opnsense/core/security/advisories/GHSA-5rx3-w735-74wm)

## Related threats

- [OPNsense configuration line injection via GUI and API fields](https://junglewise.ai/threats/cve-2026-57154-opnsense-is-a-freebsd-based-firewall-and-routing-platform-prior)
- [OPNsense cross-site scripting in web interface](https://junglewise.ai/threats/cve-2026-115425-multiple-cross-site-scripting-xss-vulnerabilities-affect)
- [OPNsense newline injection in WebGUI login lockout bypass](https://junglewise.ai/threats/cve-2026-63442-opnsense-is-a-freebsd-based-firewall-and-routing-platform-prior)
- [OPNsense stored cross-site scripting in firewall rule and NAT tooltips](https://junglewise.ai/threats/cve-2026-58391-opnsense-is-a-freebsd-based-firewall-and-routing-platform-prior)
- [OPNsense stored XSS in OpenVPN connection-status widget](https://junglewise.ai/threats/cve-2026-58390-opnsense-is-a-freebsd-based-firewall-and-routing-platform-prior)
