Upgrade to the fixed release for your branch: 5.42.3, 5.40.5.Vendor announcement
Distro perl gets backported fixes under its own version: check your distro tracker. Restart long-running Perl processes (mod_perl, Starman, Mojolicious).
Using distro packages? Distros backport fixes under their own version numbers. Check your distro's status for CVE-2026-13221 (and the other 2 CVEs):Debian · Ubuntu · Red Hat · Alpine