CVE-2026-49387

Description

A flaw was found in Netatalk. In the Apple Filing Protocol daemon (afpd), Spotlight remote procedure call (RPC) request handlers fail to validate the element count against the remaining input data length. An authenticated remote attacker with access to a Spotlight-enabled volume can exploit this vulnerability by sending a specially crafted request to trigger an out-of-bounds heap memory read. This can cause the worker process handling the session to crash, resulting in a Denial of Service (DoS).

Statement

This vulnerability is rated as Moderate impact because exploitation requires a valid authenticated user session with access to a volume configured with Spotlight indexing, and the resulting crash is limited to the child worker handling that specific connection. In typical deployments, the main daemon process continues to run unaffected, preventing a service-wide outage for other active clients. Furthermore, the out-of-bounds heap read does not expose memory contents across the network or allow arbitrary code execution.

Mitigation

To mitigate this vulnerability, disable Spotlight search indexing across shared volumes:

1. Edit the Netatalk configuration file `/etc/netatalk/afp.conf` to set `spotlight = no` in the `[Global]` section or disable it within individual volume definitions:

ini
[Global]
spotlight = no

2. Apply the configuration change by restarting the Netatalk service:

sh
systemctl restart netatalk

Warning: Restarting the Netatalk service will disconnect active client connections and temporarily interrupt file-sharing operations.

Caveats:
Disabling Spotlight removes the ability for macOS clients to perform Spotlight search queries on indexed AFP shares. Additionally, network exposure can be reduced by restricting access to the AFP service (TCP port 548) to trusted IP addresses using firewall rules.

Understanding the Weakness (CWE)

Confidentiality

Technical Impact: Read Memory

An attacker could get secret values such as cryptographic keys, PII, memory addresses, or other information that could be used in additional attacks.

Confidentiality

Technical Impact: Bypass Protection Mechanism

Out-of-bounds memory could contain memory addresses or other information that can be used to bypass ASLR and other protection mechanisms in order to improve the reliability of exploiting a separate weakness for code execution.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

An attacker could cause a segmentation fault or crash by causing memory to be read outside of the bounds of the buffer. This is especially likely when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string.

Other

Technical Impact: Varies by Context

The read operation could produce other undefined or unexpected results.

Frequently Asked Questions

Want to get errata notifications? Sign up here.