Malware can potentially be created for and can be run on any ill-configured, ill-secured, down-revision network-connected device. Whether that network-connected device is a laptop or desktop system running macOS or Windows, or is a network router, a Wi-Fi device, a network-connected printer, a remote server that's running a web forum or that's hosting files for downloads, even an Internet-connected light bulb, or otherwise. All of these devices are network-connected computers, running complex firmware and/or software, and design or implementation mistakes in any of these devices can expose vulnerabilities.
Reputable vendors do work to avoid and to reduce these vulnerabilities, and providing updates where necessary.
As for the VPNfilter mess that is what the FBI is presently discussing, neither Apple nor FBI nor the (very detailed!) Talos VPNfilter security report have indicated that any Apple wireless devices are vulnerable.
Per the technical details in the Talos report: "The known devices affected by VPNFilter are Linksys, MikroTik, NETGEAR and TP-Link networking equipment in the small and home office (SOHO) space, as well at QNAP network-attached storage (NAS) devices. No other vendors, including Cisco, have been observed as infected by VPNFilter, but our research continues."
But if you're concerned, reboot your devices as per the FBI announcements. The reboot itself is harmless, though it will interrupt any existing network connections and require those connections be re-established.
If your Apple AirPort or Time Capsule passwords are simple and/or are widely-known to folks, you can change them to more secure passwords. That works better if you change the network name (SSID) at the same time.
The associated US Government (legal) documents: