Miggo Logo

CVE-2022-22846: dnslib has DNS reply verification issue

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.4235%
Published
1/12/2022
Updated
9/18/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
dnslibpip< 0.9.170.9.17

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing TXID validation in DNS response handling. The GitHub commit 76e8677 explicitly adds this check in client.py, specifically after parsing the response packet. The pre-patch code in client.py processed responses without comparing q.header.id (query ID) and a.header.id (response ID). Since the fix was applied to the code responsible for sending queries and processing responses (as shown in the client.py diff), the vulnerable function is identified as the DNSRecord.send method, which handles the transmission and initial response processing.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** *nsli* p**k*** t*rou** *.*.** *or Pyt*on *o*s not v*ri*y t**t t** I* v*lu* in * *NS r*ply m*t***s *n I* v*lu* in * qu*ry.

Reasoning

T** vuln*r**ility st*ms *rom missin* TXI* v*li**tion in *NS r*spons* **n*lin*. T** *it*u* *ommit ******* *xpli*itly ***s t*is ****k in *li*nt.py, sp**i*i**lly **t*r p*rsin* t** r*spons* p**k*t. T** pr*-p*t** *o** in *li*nt.py pro**ss** r*spons*s wit*