CVE-2021-20247 Path traversal in isync/mbsync

High 7.4 Published Updated

A malicious IMAP server can exploit path traversal in mbsync to access or modify files outside the designated mailbox directory.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-20247?

CVE-2021-20247 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 23 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in mbsync before v1.3.5 and v1.4.1. Validations of the mailbox names returned by IMAP LIST/LSUB do not occur allowing a malicious or compromised server to use specially crafted mailbox names containing '..' path components to access data outside the designated mailbox on the opposite end of the synchronization channel. The highest threat from this vulnerability is to data confidentiality and integrity.

Weakness: CWE-22, CWE-20

Which versions are affected by CVE-2021-20247?

It affects 4 products.

Linux distribution packages (2)
isync SUSE:Package Hub 15 SP2All versions1.3.5-bp152.4.3.1
isync openSUSE:Leap 15.2All versions1.3.5-lp152.4.3.1

Products include Debian Debian Linux, Fedoraproject Extra Packages for Enterprise Linux, Fedoraproject Fedora, Mbsync Project Mbsync.

How do I fix CVE-2021-20247?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-20247 being exploited?

There is no known exploitation of CVE-2021-20247 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-20247, GHSA-5cp5-w68m-9w38, UBUNTU-CVE-2021-20247, openSUSE-SU-2021:0516-1, openSUSE-SU-2021:0533-1.

Is CVE-2021-20247 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free