How to update sudo version on Linux

The latest heap buffer overflow vulnerability discovered in sudo (CVE-2021-3156) can trigger privilege escalation and allow any unprivileged user (those not in the sudoers list, or even nobody) to bypass password authentication and gain the root access. This vulnerability can easily be exploited as the second-stage attack once a low-level service account gets breached. This tutorial describes how to check if your sudo is vulnerable and how to update it on your Linux system.