CVE-2022-22846: DNS reply verification issue in dnslinb
Summary
CVE-2022-22846: dnslib has DNS reply verification issue. Affects dnslib versions < 0.9.17. Fixed in 0.9.17. How to fix ↓
Also tracked for
- python-dnslib · Debian:11
The same CVE-2022-22846 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The dnslib package is a Python library used for parsing and manipulating DNS packets. It provides functionality to create, send, and receive DNS queries and responses. The package is commonly used in network programming and DNS-related applications. However, versions up to 0.9.16 of dnslib are vulnerable to a DNS reply verification issue.
Vulnerability Detail
The vulnerability in dnslib arises from the lack of verification of the ID value in a DNS reply against the ID value in the corresponding query. This oversight allows an attacker to craft malicious DNS replies with arbitrary ID values, potentially leading to cache poisoning attacks or other DNS-related security issues. The impact of this vulnerability can range from DNS spoofing to potential data exfiltration or unauthorized access to network resources.
How To Fix
Latest published version: 0.9.26 as of 22 Oct 2026
pip install --upgrade "dnslib==0.9.26"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.9.17
This is the first release that contains the fix.
pip install --upgrade "dnslib==0.9.17"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is crucial to update to the fixed version of dnslib as soon as possible.
Conclusion
In conclusion, the dnslib package up to version 0.9.16 is vulnerable to a DNS reply verification issue. This vulnerability can have severe consequences, including DNS spoofing and unauthorized access to network resources. It is highly recommended to update to version 0.9.17 or later to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for dnslib →
FAQ
dnslib is a Python library used for parsing and manipulating DNS packets. It provides functionality to create, send, and receive DNS queries and responses.
The vulnerability allows an attacker to craft malicious DNS replies, potentially leading to cache poisoning attacks or other DNS-related security issues. This can result in DNS spoofing, data exfiltration, or unauthorized access to network resources.
To fix this vulnerability, it is recommended to upgrade the dnslib package to version 0.9.17 or later. Users can update their package by running the command 'pip install --upgrade dnslib'.
There is no known workaround for this vulnerability. It is crucial to update to the fixed version of dnslib as soon as possible.
For more information about this vulnerability, you can refer to the GitHub Security Advisory GHSA-r478-c2pc-m7gx.