CVE-2022-45188

7.8 HIGH

📋 TL;DR

CVE-2022-45188 is a heap-based buffer overflow vulnerability in Netatalk's afp_getappl function that allows remote code execution via a malicious .appl file. This affects Netatalk versions through 3.1.13 and can provide remote root access on platforms like FreeBSD (used in TrueNAS). Organizations using Netatalk for Apple Filing Protocol (AFP) file sharing services are at risk.

💻 Affected Systems

Products:
  • Netatalk
Versions: Versions through 3.1.13
Operating Systems: Linux, FreeBSD, Other Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: TrueNAS systems using FreeBSD are particularly vulnerable due to default root access. Any system with Netatalk configured for AFP file sharing is affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote attacker gains root privileges on vulnerable systems, leading to complete system compromise, data theft, and persistent backdoor installation.

🟠

Likely Case

Remote code execution with the privileges of the Netatalk service (often root), enabling file system access, service disruption, and lateral movement.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege, and monitoring are in place, potentially containing the attack to the affected service.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending a crafted .appl file to the AFP service, which is often accessible over the network without authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Netatalk 3.1.14 or later

Vendor Advisory: https://netatalk.sourceforge.io/3.1/ReleaseNotes3.1.13.html

Restart Required: Yes

Instructions:

1. Update Netatalk to version 3.1.14 or later using your package manager (e.g., apt, yum). 2. Restart the Netatalk service. 3. Verify the update with 'netatalk -v'.

🔧 Temporary Workarounds

Disable AFP Service

linux

Temporarily disable the Netatalk AFP service if patching is not immediately possible.

sudo systemctl stop netatalk
sudo systemctl disable netatalk

Network Segmentation

linux

Restrict network access to the AFP service using firewall rules to limit exposure.

sudo iptables -A INPUT -p tcp --dport 548 -j DROP
sudo iptables -A INPUT -p udp --dport 548 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit AFP service exposure to trusted IPs only.
  • Monitor logs for unusual .appl file access attempts and consider using application whitelisting.

🔍 How to Verify

Check if Vulnerable:

Check Netatalk version with 'netatalk -v' or 'dpkg -l | grep netatalk' on Debian-based systems. If version is 3.1.13 or earlier, it is vulnerable.

Check Version:

netatalk -v

Verify Fix Applied:

After update, run 'netatalk -v' to confirm version is 3.1.14 or later and check service status with 'systemctl status netatalk'.

📡 Detection & Monitoring

Log Indicators:

  • Unusual .appl file access in Netatalk logs
  • Failed authentication attempts or buffer overflow errors in system logs

Network Indicators:

  • Unexpected connections to AFP port 548/tcp or 548/udp
  • Traffic patterns indicating file uploads to AFP service

SIEM Query:

source="netatalk.log" AND ("appl" OR "buffer overflow")

🔗 References

📤 Share & Export