CVEfocus › CVE database › CVE-2020-15229

CVE-2020-15229Path traversal and files overwrite with unsquashfs

CVSS 8.2 HighEPSS 2.0% (higher than 82% of CVEs)Published 2020-10-14Updated 2024-08-04Assigner: GitHub_M

Singularity (an open source container platform) from version 3.1.1 through 3.6.3 has a vulnerability. Due to insecure handling of path traversal and the lack of path sanitization within `unsquashfs`, it is possible to overwrite/create any files on the host filesystem during the extraction with a crafted squashfs filesystem. The extraction occurs automatically for unprivileged (either installation or with `allow setuid = no`) run of Singularity when a user attempt to run an image which is a local SIF image or a single file containing a squashfs filesystem and is coming from remote sources `library://` or `shub://`. Image build is also impacted in a more serious way as it can be used by a root user, allowing an attacker to overwrite/create files leading to a system compromise, so far bootstrap methods `library`, `shub` and `localimage` are triggering the squashfs extraction. This issue is addressed in Singularity 3.6.4. All users are advised to upgrade to 3.6.4 especially if they use Singularity mainly for building image as root user. There is no solid workaround except to temporary avoid to use unprivileged mode with single file images in favor of sandbox images instead. Regarding image build, temporary avoid to build from `library` and `shub` sources and as much as possible use `--fakeroot` or a VM for that.

CWE-22

What to do

Fixed builds are available from Alpine, Go: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Alpine Linux 3.24singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Alpine Linux 3.23singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Alpine Linux 3.22singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Alpine Linux 3.21singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Alpine Linux 3.20singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Alpine Linux 3.19singularityFixed3.6.4-r0ALPINE-CVE-2020-15229
Go librarygithub.com/sylabs/singularityFixed3.6.4GHSA-7gcp-w6ww-2xv9

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.