Summary
Path traversal and files overwrite with unsquashfs in singularity
Workarounds
There is no solid workaround except to temporarily avoid use of unprivileged mode with single file images, in favor of sandbox images instead. Regarding image build, temporarily avoid building from library and shub sources, and as much as possible use --fakeroot or a VM to limit potential impact.
For more information
General questions about the impact of the advisory / changes made in the 3.6.0 release can be asked in the:
Any sensitive security concerns should be directed to: [email protected]
See our Security Policy here: https://sylabs.io/security-policy
Impact
Due to insecure handling of path traversal and the lack of path sanitization within unsquashfs (a distribution provided utility used by Singularity), it is possible to overwrite/create any files on the host filesystem during the extraction of a crafted squashfs filesystem.
Squashfs extraction occurs automatically for unprivileged execution of Singularity (either --without-suid installation or with allow setuid = no) when a user attempts to run an image which:
- is a local SIF image or a single file containing a squashfs filesystem
- is pulled from remote sources
library://orshub://
Image build is also impacted in a more serious way as it is often performed by the root user, allowing an attacker to overwrite/create files leading to a system compromise. Bootstrap methods library, shub and localimage trigger a squashfs extraction.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2020-15229 has a CVSS score of 8.2 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.6.4); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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.
Frequently Asked Questions
- What is CVE-2020-15229? CVE-2020-15229 is a high-severity path traversal vulnerability in github.com/sylabs/singularity (go), affecting versions >= 3.1.1, < 3.6.4. It is fixed in 3.6.4. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2020-15229? CVE-2020-15229 has a CVSS score of 8.2 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/sylabs/singularity are affected by CVE-2020-15229? github.com/sylabs/singularity (go) versions >= 3.1.1, < 3.6.4 is affected.
- Is there a fix for CVE-2020-15229? Yes. CVE-2020-15229 is fixed in 3.6.4. Upgrade to this version or later.
- Is CVE-2020-15229 exploitable, and should I be worried? Whether CVE-2020-15229 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2020-15229 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2020-15229? Upgrade
github.com/sylabs/singularityto 3.6.4 or later.