CVE-2023-46566

7.5 HIGH

📋 TL;DR

A buffer overflow vulnerability in msoulier's tftpy library allows remote attackers to cause denial of service by sending specially crafted packets to the TFTP server. This affects any application using the vulnerable version of the tftpy library for TFTP services. The vulnerability is triggered through the parse function in the TftpPacketFactory class.

💻 Affected Systems

Products:
  • msoulier tftpy library
Versions: Versions up to commit 467017b844bf6e31745138a30e2509145b0c529c
Operating Systems: All operating systems running vulnerable tftpy library
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the vulnerable tftpy library for TFTP server functionality is affected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if the buffer overflow can be exploited to execute arbitrary code.

🟠

Likely Case

Denial of service causing the TFTP service to crash, disrupting file transfers.

🟢

If Mitigated

Limited impact with proper network segmentation and access controls preventing external exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malicious packets to the TFTP service port (typically UDP 69).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit 467017b844bf6e31745138a30e2509145b0c529c

Vendor Advisory: https://github.com/msoulier/tftpy/issues/140

Restart Required: Yes

Instructions:

1. Update tftpy library to latest version. 2. Restart any services using tftpy. 3. Verify the fix by checking the commit hash is newer than 467017b844bf6e31745138a30e2509145b0c529c.

🔧 Temporary Workarounds

Network Access Control

all

Restrict access to TFTP services using firewall rules

iptables -A INPUT -p udp --dport 69 -j DROP
netsh advfirewall firewall add rule name="Block TFTP" dir=in action=block protocol=UDP localport=69

Service Disablement

all

Disable TFTP services if not required

systemctl disable tftp
sc config tftp start= disabled

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate TFTP services
  • Deploy intrusion detection/prevention systems to monitor for exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check the tftpy library version or commit hash in your application dependencies

Check Version:

Check your application's dependency manifest or run: pip show tftpy | grep Version

Verify Fix Applied:

Verify the tftpy library commit hash is newer than 467017b844bf6e31745138a30e2509145b0c529c

📡 Detection & Monitoring

Log Indicators:

  • TFTP service crashes
  • Abnormal packet size errors in TFTP logs
  • Repeated connection attempts to UDP port 69

Network Indicators:

  • Unusually large TFTP packets
  • Malformed TFTP protocol packets
  • Traffic patterns indicating buffer overflow attempts

SIEM Query:

source="tftp.log" AND ("crash" OR "buffer" OR "overflow" OR "malformed packet")

🔗 References

📤 Share & Export