Patch out for Debian 12; Debian 11 not affected.
Edit: 18.04 Bionic is unaffected, the ssh version is 7.6 which is too old.
If you don't have extended support: You're vulnerable to worse, easier to exploit bugs :)
[1] https://security-tracker.debian.org/tracker/CVE-2024-6387