---
id: "CVE-2026-116013"
kind: "vulnerability"
aliases: ["CVE-2026-116013"]
title: "OpenResty lua-resty-dns: malformed DNS replies crash name resolution"
severity: "medium"
cvss: 6.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["lua-resty-dns", "nginx", "openresty", "package"]
not_affected_if: ["default-config"]
published_at: "2026-10-24T12:16:57+00:00"
first_seen_at: "2026-10-24T12:47:58+00:00"
updated_at: "2026-10-25T04:00:01+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116013", "first_seen_at": "2026-10-24T12:47:58+00:00"}]
---

# OpenResty lua-resty-dns: malformed DNS replies crash name resolution

The lua-resty-dns library for OpenResty fails to check DNS record lengths, so a malformed reply from a queried nameserver raises an uncaught Lua exception. An attacker who controls or spoofs that nameserver can abort requests and break name resolution.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed lua-resty-dns version in your OpenResty or lua-resty packages, for example `opm list` or the lua-resty-dns source file's version header
- Confirm whether your resolver code calls `resolver:query()` on untrusted or unreliable nameservers

## Fix

- Upgrade lua-resty-dns to `0.24` or later
- Reload OpenResty after the upgrade

## Timeline

- 2026-10-24T12:47:58+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116013

## From the sources

OpenResty lua-resty-dns before 0.24 contains an improper input validation vulnerability in parse_section() and _decode_name() that fails to check resource record lengths against the received message. Attackers controlling or spoofing a queried nameserver can send truncated record headers or RDATA, raising uncaught Lua exceptions in resolver:query() that abort requests and break name resolution.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
