Improper Handling of Length Parameter Inconsistency Affecting resolv package, versions <0.3.2>=0.4.0, <0.7.2


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.35% (28th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-RESOLV-19477215
  • published1 Sept 2026
  • disclosed29 Aug 2026
  • creditUnknown

Introduced: 29 Aug 2026

NewCVE-2026-80213  (opens in a new tab)
CWE-130  (opens in a new tab)

How to fix?

Upgrade resolv to version 0.3.2, 0.7.2 or higher.

Overview

resolv is a Thread-aware DNS resolver library in Ruby.

Affected versions of this package are vulnerable to Improper Handling of Length Parameter Inconsistency via Resolv::DNS::MessageEncoder#put_string, put_label, and Resolv::DNS::Name.create in lib/resolv.rb. An attacker can make an application send a DNS query for the wrong hostname by supplying an overlong label or hostname to be encoded. put_string wrote the label length into a single octet without checking the range, so labels longer than 255 octets wrapped modulo 256 while the label bytes were still written unchanged. That lets attacker-controlled input produce wire bytes that decode to a different domain name than the one the application intended to resolve, which can bypass hostname allowlists and send lookups to an attacker-chosen name.

CVSS Base Scores

version 4.0
version 3.1