ThinkFacility Sign in
  1. Home
  2. Security
  3. Python package (dnspython)
HighPython package (dnspython)

dnspython before 2.9.2: a crafted zone file can exhaust memory and crash your program, update now

Python developers whose code uses dnspython to read zone files or record text that other people can write, such as DNS hosting panels and DNS tools.

How to fix it

You haveUpdate to
< 2.9.2→2.9.2

Check your version

Which version you have
pip show dnspython

Update

pip
pip install --upgrade "dnspython>=2.9.2"
uv
uv add "dnspython>=2.9.2"

The bug is in how dnspython reads WKS records from zone-file text. It never checks that the service number stays under 65536, so a huge one makes it grow a bitmap until memory runs out. You're only exposed if your program parses zone-file text where someone else picks the record type and data. Ordinary DNS lookups aren't affected.

Sources