I know there are several attack vectors on public Wifi, but these days are they mostly mitigated?
- Man-in-the-middle attacks: thwarted by certificate authority checking by the browser and/or certificate pinning in mobile apps. Browser will not let you advance if the certificate is invalid.
- Replay attacks: OAuth tokens expire and good sites will use nonces.
- Packing sniffing on open networks: thwarted by TSL over http and encrypted traffic (unless you have a root certificate installed).
- DNS lookups are somewhat plaintext, but now started to be done over https. Even then, attackers would know what you're connected to, but not what you are saying.
- Port scanning/direct attacks: Firewalls by default lock down ports and well-patched machines prevent this
- Email (SMTP) and other protocols: are all encrypted as well to prevent snooping.
Is using public Wifi actually dangerous? If so, what's the attack vector?
Most of the "shame on public WiFi" comes from VPN companies, which are just trying to fearmonger into a sale. Sure, DNS over HTTPs isn't as widespread as it should be. Sure, some websites aren't encrypted, still. But that doesn't mean that routing all of your insecure traffic to a VPN provider so they can handle it instead is going to increase your security. It just moves the threat model from "your public WiFi network and people on it" to the VPN provider.
If you really want to be safe, you could run your own VPN with algo (https://github.com/trailofbits/algo) or manually setup WireGuard and route traffic e.g., back to your home ISP, instead. That's probably my best suggestion, rather than using any of the cliche VPN providers that advertise everywhere.