{"id":"CVE-2020-15229","published":"2020-10-14T18:55:14Z","modified":"2024-08-04T13:08:23Z","title":"Path traversal and files overwrite with unsquashfs","vendor":"hpcng","product":"singularity","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02046,"percentile":0.81678,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/hpcng/singularity/security/advisories/GHSA-7gcp-w6ww-2xv9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/hpcng/singularity/blob/v3.6.4/CHANGELOG.md#security-related-fixes","tags":["x_refsource_MISC"]},{"url":"https://github.com/hpcng/singularity/pull/5611","tags":["x_refsource_MISC"]},{"url":"https://github.com/hpcng/singularity/commit/eba3dea260b117198fdb6faf41f2482ab2f8d53e","tags":["x_refsource_MISC"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00071.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00070.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-11/msg00009.html","tags":["vendor-advisory","x_refsource_SUSE"]}],"priority":{"score":22.1,"factors":[{"name":"EPSS percentile","points":16.34},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"hpcng","affectedVersions":[{"vendor":"hpcng","product":"singularity","versions":["< 3.6.4"]}],"affected":[{"ecosystem":"Go","package":"github.com/sylabs/singularity","vulnerableRanges":[">=3.1.1, <3.6.4"],"patched":["3.6.4"],"from":["GHSA-7gcp-w6ww-2xv9"],"provenance":"source"}],"summary":{"text":"The path traversal flaw in Singularity's bundled unsquashfs component (versions 3.1.1 through 3.6.3 of the open source HPC container platform from hpcng) lets a crafted squashfs filesystem overwrite or create arbitrary files on the host during extraction. An attacker can trigger this over the network by getting a user to run a malicious image from a remote source (library:// or shub://) or a local SIF file, with extraction happening automatically for unprivileged users, and the impact is more serious during image builds run as root, where it can lead to system compromise.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:48:18Z"},"euvd":{"id":"EUVD-2021-0998","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-13846","published":"2020-07-14","fixed":"3.6.0","kev":false},{"cve":"CVE-2020-25039","published":"2020-09-16","fixed":"3.6.3","kev":false,"link":{"from":"CVE-2020-25039","to":"CVE-2020-15229","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/sylabs/singularity","fromFixed":"3.6.3","toFixed":"3.6.4","daysApart":28}]}},{"cve":"CVE-2020-25040","published":"2020-09-16","fixed":"3.6.3","kev":false},{"cve":"CVE-2020-15229","published":"2020-10-14","fixed":"3.6.4","kev":false},{"cve":"CVE-2021-32635","published":"2021-05-28","fixed":"3.7.4","kev":false}],"package":"Go:github.com/sylabs/singularity"}}