Skip to main content

lua-resty-dns EUVDEUVD-2026-109271

| CVE-2026-116013 MEDIUM
Improper Handling of Length Parameter Inconsistency (CWE-130)
2026-10-24 VulnCheck GHSA-879w-j376-3fgq
6.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Control or spoof queried nameserver
  2. Delivery
    Return DNS reply with truncated RR header or short RDATA
  3. Exploit
    Out-of-range read in parse_section()/_decode_name()
  4. Execution
    Uncaught Lua exception in resolver:query()
  5. Impact
    Abort request, break name resolution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Length parameter validation
Exploitation Conditions

The attacker must be able to control the authoritative/queried nameserver, or be positioned to spoof its responses (off-path spoofing requires winning the race against the legitimate reply and matching the transaction ID - this is the AT:P requirement), for a name that a victim resolves using lua-resty-dns before 0.24. The concrete trigger is a DNS reply in which a resource record's declared length exceeds the actual message bytes: short A RDATA (len != 4), short AAAA RDATA (len != 16), a record header that overruns the buffer (the added pos+9 > #buf check), excessive DNS compression pointers (the 128-pointer limit added to _decode_name), or malformed SOA/TXT string lengths. Both UDP and TCP paths are affected (the regression tests exercise tcp_query). LIMITING FACTORS: no authentication (PR:N) and no user interaction are needed, but exploitation requires attacker control or spoofing of the nameserver response (not merely network reach to the application); impact is confined to availability (aborted queries / failed name resolution), with no code execution, data exposure, or integrity impact.

Impact

This is a genuine but bounded availability issue, not a top-tier emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, 6.3 medium) correctly scopes it as an availability-only denial of service: no confidentiality or integrity impact, and the AT:P 'attack requirement' reflects that the attacker must control or spoof the queried nameserver rather than simply reaching the service. The input provides no EPSS score and the CVE is not listed in CISA KEV, so there is no signal of widespread or confirmed active exploitation; the vuln.today Decision label is 'this_month', consistent with a real-but-not-critical priority to be patched in the normal cycle rather than an act_now/emergency. The practical risk hinges on attacker position: if the application resolves names whose authoritative server the attacker controls, exploitation is trivial (AC:L); if the attacker is off-path and must spoof UDP responses, they must win the race and guess the transaction ID, which is a meaningful barrier (this is what AT:P captures). Impact is a broken resolver:query() that aborts the request and disrupts name resolution - potentially cascading in gateways/proxies that depend on DNS - but it does not yield code execution or data exposure. Note the Tags label this 'Information Disclosure', which conflicts with the vector (VC:N) and the description; this is an availability DoS, so the information-disclosure framing should be disregarded.

Exploit ScenarioDerived

An attacker who operates - or can spoof responses from - a DNS nameserver that an OpenResty/lua-resty-dns (< 0.24) application queries returns a reply containing a resource record whose declared length exceeds the actual bytes present (a truncated record header or short RDATA). When resolver:query() parses it, the missing bounds checks in parse_section()/_decode_name() cause an out-of-range read that raises an uncaught Lua exception, aborting the request and breaking name resolution for the service. A public PoC reference exists: the PR #83 regression tests craft short A/AAAA RDATA and truncated headers that trigger the failure over both UDP and TCP; it is not verified as a standalone weaponized exploit.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 24, 2026

Malformed DNS replies can crash the parser in lua-resty-dns before 0.24, causing resolver:query() to raise an uncaught Lua exception that aborts the request and breaks name resolution for that worker. The flaw sits in parse_section() and _decode_name(), which trust the resource-record lengths declared in the received message and previously truncated over-long TXT/SOA data instead of rejecting it; a short A RDATA, short AAAA RDATA, truncated record header, or excessive compression pointers is enough to trigger the failure. Exploitation requires the attacker to control the queried authoritative nameserver or to spoof its response (off-path spoofing also has to win the transaction-ID race), so no authentication or user interaction is needed but network position against the resolver's upstream is; impact is limited to availability (aborted lookups, failed resolution) with no code execution, data exposure, or integrity loss. No public exploit has been identified at time of analysis and the issue is not in CISA KEV; a vendor patch is available in v0.24.

RemediationAI

Upgrade lua-resty-dns to v0.24 or later (vendor-released patch; the fix is commit b68eaecbf7997ac71c08ba56032b1f45438bd758 and PR https://github.com/openresty/lua-resty-dns/pull/83, with the patched tree at https://github.com/openresty/lua-resty-dns/tree/v0.24), then redeploy the Lua tree and reload nginx so workers pick up the new resolver.lua. Because the trigger is a hostile or spoofed reply from the nameserver the resolver is configured to use, a compensating control for environments that cannot upgrade immediately is to point the resolver only at nameservers you control or fully trust and, where feasible, enable DNSSEC validation or response-source filtering on that upstream path - the trade-off is added dependency on trusted/DNSSEC-capable resolvers and extra latency. Additionally, wrapping resolver:query() calls in pcall and failing over to a secondary resolver name limits the blast radius of the uncaught exception (it still aborts the individual lookup, but prevents the error from propagating through the request handler); this is a containment measure only and does not replace the v0.24 upgrade. No vendor-released patch is available for 0.23 or earlier branches other than the v0.24 line.

Affected VersionsENISA

lua-resty-dns 0 <0.24

Affected Packages

euvd lua_resty_dns fix: 0.24

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

lua-resty-dns is the pure-Lua DNS resolver shipped for OpenResty/ngx_lua, decoding raw RFC 1035 wire messages inside parse_section() and _decode_name() in lib/resty/dns/resolver.lua. The root cause is CWE-130 (Improper Handling of Length Parameter Inconsistency): the parser read the RR header and RDLENGTH field but did not verify that the declared lengths fit inside the received buffer before indexing into it. The upstream fix (PR #83, commit b68eaecb) adds explicit bounds checks throughout: a pos + 9 > #buf guard before decoding each record header, a p + fst > #buf guard inside _decode_name()'s compression-pointer target, a hard cap of 128 compression pointers to stop pointer-loop abuse, type-specific RDATA validation (TYPE_A must be exactly 4 bytes, TYPE_AAAA exactly 16 bytes, SOA's compressed-name pair must land exactly 19 bytes before the record end), rejection of zero-length or over-running TXT/other string segments (previously silently truncated), and corrected error offsets (returning p rather than pos). Two resolver code paths are involved - the UDP query path and the tcp_query() path exercised by the new t/record-bounds.t regression suite - so a single hostile or spoofed answer is sufficient regardless of transport. The affected CPE, cpe:2.3:a:openresty:lua-resty-dns:*:*:*:*:*:*:*:*, covers all releases up to but excluding the v0.24 tag; the vulnerable logic is visible in the v0.23 source at resolver.lua lines 396-442.

Know when Openresty gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 3.7 LOW

Availability-only DoS (A:L, C:N/I:N); remote and unauthenticated (AV:N/PR:N/UI:N) but requires controlling or spoofing the queried nameserver response, so AC:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Medium
popular DNS resolver library bundled with OpenResty, used by Lua gateways
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy