CVE-2020-25040
Insecure permissions on build temporary rootfs in Singularity
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
8.8
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
CVE-2020-25040- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.5 Medium
AV:N/AC:L/Au:S/C:P/I:P/A:P - Weakness
- CWE-668
- Updated
- 2026-11-02
CVE List No score
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
CVE-2020-25040- Updated
- 2026-11-02
EUVDEUVD-2021-1126 No score
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
EUVD-2021-1126- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-jv9c-w74q-6762
8.8
Insecure permissions on build temporary rootfs in Singularity
Impact
Insecure permissions on temporary directories used in explicit and implicit container build operations.
When a Singularity command that results in a container build operation is executed, it is possible for a user with access to the system to read the contents of the image during the build. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running build, which in certain circumstances may enable arbitrary code execution during the build and/or when the built container is run.
Patches
This issue is addressed in Singularity 3.6.3.
All users are advised to upgrade to 3.6.3.
Workarounds
The issue is mitigated if TMPDIR is set to a location that is only accessible to the user, as any subdirectories directly under TMPDIR cannot then be accessed by others. However, this is difficult to enforce so it is not recommended to rely on this as a mitigation.
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
- Record
GHSA-jv9c-w74q-6762- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-668, CWE-732
- Updated
- 2026-11-02
OSVALPINE-CVE-2020-25040
8.8
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
ALPINE-CVE-2020-25040- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSV
8.8
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
CVE-2020-25040- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-jv9c-w74q-6762
8.8
Insecure permissions on build temporary rootfs in Singularity
Impact
Insecure permissions on temporary directories used in explicit and implicit container build operations.
When a Singularity command that results in a container build operation is executed, it is possible for a user with access to the system to read the contents of the image during the build. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running build, which in certain circumstances may enable arbitrary code execution during the build and/or when the built container is run.
Patches
This issue is addressed in Singularity 3.6.3.
All users are advised to upgrade to 3.6.3.
Workarounds
The issue is mitigated if TMPDIR is set to a location that is only accessible to the user, as any subdirectories directly under TMPDIR cannot then be accessed by others. However, this is difficult to enforce so it is not recommended to rely on this as a mitigation.
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
- Record
GHSA-jv9c-w74q-6762- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-668, CWE-732
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2020-25040
8.8
Sylabs Singularity through 3.6.2 has Insecure Permissions on temporary directories used in explicit and implicit container build operations, a different vulnerability than CVE-2020-25039.
- Record
UBUNTU-CVE-2020-25040- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2020:1497-1 No score
Security update for singularity
This update for singularity fixes the following issues:
New version 3.6.3, addresses the following security issues:
-
CVE-2020-25039, boo#1176705
When a Singularity action command (run, shell, exec) is run with the fakeroot or user namespace option, Singularity will extract a container image to a temporary sandbox directory. Due to insecure permissions on the temporary directory it is possible for any user with access to the system to read the contents of the image. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running container.
-
CVE-2020-25040, boo#1176707
When a Singularity command that results in a container build operation is executed, it is possible for a user with access to the system to read the contents of the image during the build. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running build, which in certain circumstances may enable arbitrary code execution during the build and/or when the built container is run.
New version 3.6.2, new features / functionalities:
-Add --force option to singularity delete for non-interactive workflows. -Support compilation with FORTIFY_SOURCE=2 and build in pie mode with fstack-protector enabled
- Changed defaults / behaviours -Default to current architecture for singularity delete.
- Bug Fixes -Respect current remote for singularity delete command. -Allow rw as a (noop) bind option. -Fix capability handling regression in overlay mount. -Fix LD_LIBRARY_PATH environment override regression with --nv/--rocm. -Fix environment variable duplication within singularity engine. -Use -user-xattrs for unsquashfs to avoid error with rootless extraction using unsquashfs 3.4 -Correct --no-home message for 3.6 CWD behavior. -Don't fail if parent of cache dir not accessible. -Fix tests for Go 1.15 Ctty handling. -Fix additional issues with test images on ARM64. -Fix FUSE e2e tests to use container ssh_config. -Provide advisory message r.e. need for upper and work to exist in overlay images. -Use squashfs mem and processor limits in squashfs gzip check. -Ensure build destination path is not an empty string - do not overwrite CWD. -Don't unset PATH when interpreting legacy /environment files.
- Record
openSUSE-SU-2020:1497-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2020:1529-1 No score
Security update for singularity
This update for singularity fixes the following issues:
New version 3.6.3, addresses the following security issues:
-
CVE-2020-25039, boo#1176705
When a Singularity action command (run, shell, exec) is run with the fakeroot or user namespace option, Singularity will extract a container image to a temporary sandbox directory. Due to insecure permissions on the temporary directory it is possible for any user with access to the system to read the contents of the image. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running container.
-
CVE-2020-25040, boo#1176707
When a Singularity command that results in a container build operation is executed, it is possible for a user with access to the system to read the contents of the image during the build. Additionally, if the image contains a world-writable file or directory, it is possible for a user to inject arbitrary content into the running build, which in certain circumstances may enable arbitrary code execution during the build and/or when the built container is run.
New version 3.6.2, new features / functionalities:
-Add --force option to singularity delete for non-interactive workflows. -Support compilation with FORTIFY_SOURCE=2 and build in pie mode with fstack-protector enabled
- Changed defaults / behaviours -Default to current architecture for singularity delete.
- Bug Fixes -Respect current remote for singularity delete command. -Allow rw as a (noop) bind option. -Fix capability handling regression in overlay mount. -Fix LD_LIBRARY_PATH environment override regression with --nv/--rocm. -Fix environment variable duplication within singularity engine. -Use -user-xattrs for unsquashfs to avoid error with rootless extraction using unsquashfs 3.4 -Correct --no-home message for 3.6 CWD behavior. -Don't fail if parent of cache dir not accessible. -Fix tests for Go 1.15 Ctty handling. -Fix additional issues with test images on ARM64. -Fix FUSE e2e tests to use container ssh_config. -Provide advisory message r.e. need for upper and work to exist in overlay images. -Use squashfs mem and processor limits in squashfs gzip check. -Ensure build destination path is not an empty string - do not overwrite CWD. -Don't unset PATH when interpreting legacy /environment files.
This update was imported from the openSUSE:Leap:15.2:Update update project.
- Record
openSUSE-SU-2020:1529-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11384-1 No score
singularity-3.8.3-1.2 on GA media
These are all security issues fixed in the singularity-3.8.3-1.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11384-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/sylabs/singularityGo |
before 3.6.3 | 3.6.3 |
singularityAlpine:v3.19 |
before 3.6.3-r0 | 3.6.3-r0 |
singularityAlpine:v3.20 |
before 3.6.3-r0 | 3.6.3-r0 |
singularityAlpine:v3.21 |
before 3.6.3-r0 | 3.6.3-r0 |
singularityAlpine:v3.22 |
before 3.6.3-r0 | 3.6.3-r0 |
singularityAlpine:v3.23 |
before 3.6.3-r0 | 3.6.3-r0 |
singularityAlpine:v3.24 |
before 3.6.3-r0 | 3.6.3-r0 |
singularity-containerUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 2.3.1-22.3.2-12.4.1-12.4.2-22.4.2-32.4.2-42.4.2-4ubuntu0.1~esm1 |
None known |
singularity-containerUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 4.1.1+ds2-14.1.1+ds2-1build14.1.1+ds2-1ubuntu0.14.1.1+ds2-1ubuntu0.24.1.1+ds2-1ubuntu0.2+esm14.1.1+ds2-1ubuntu0.34.1.1+ds2-1ubuntu0.3+esm14.1.1+ds2-1ubuntu0.3+esm2 |
None known |
singularity-containerUbuntu:25.10 |
All versions, plus listed versions 4.1.5+ds4-1 |
None known |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
singularity-containerUbuntu:26.04:LTS |
All versions, plus listed versions 4.1.5+ds4-1 |
None known |
singularityopenSUSE:Leap 15.1 From an advisory covering 2 CVEs |
before 3.6.3-lp152.2.6.1 | 3.6.3-lp152.2.6.1 |
singularityopenSUSE:Leap 15.2 From an advisory covering 2 CVEs |
before 3.6.3-lp152.2.6.1 | 3.6.3-lp152.2.6.1 |
singularitySUSE:Package Hub 15 SP2 From an advisory covering 2 CVEs |
before 3.6.3-bp152.2.8.1 | 3.6.3-bp152.2.8.1 |
singularityopenSUSE:Tumbleweed From an advisory covering 12 CVEs |
before 3.8.3-1.2 | 3.8.3-1.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-25040 is a high vulnerability (CVSS 8.8) in Sylabs Singularity, published September 16, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.04%, the 81st percentile. Fixed in github.com/sylabs/singularity 3.6.3.
References
medium.com/sylabs
github.com/hpcng/singularity/security/advisories/GHSA-jv9c-w74q-6762
lists.opensuse.org/opensuse-security-announce/2020-09/msg00070.html
lists.opensuse.org/opensuse-security-announce/2020-09/msg00088.html
nvd.nist.gov/vuln/detail/CVE-2020-25040
github.com/advisories/GHSA-jv9c-w74q-6762
Show 19 moreShow less
security.alpinelinux.org/vuln/CVE-2020-25040
ubuntu.com/security/CVE-2020-25040
cve.org/CVERecord?id=CVE-2020-25040
lists.opensuse.org/archives/list/[email protected]/thread/QKNKE5OJY3RKFINGTNXXOQ62VX3JCLB3
bugzilla.suse.com/1176705
bugzilla.suse.com/1176707
suse.com/security/cve/CVE-2020-25039
suse.com/security/cve/CVE-2020-25040
lists.opensuse.org/archives/list/[email protected]/thread/JWGSXLM5VJNRINIIQEQESX2AWNIBZXWO
suse.com/security/cve/CVE-2018-12021
suse.com/security/cve/CVE-2018-19295
suse.com/security/cve/CVE-2019-11328
suse.com/security/cve/CVE-2019-19724
suse.com/security/cve/CVE-2020-13845
suse.com/security/cve/CVE-2020-13846
suse.com/security/cve/CVE-2020-13847
suse.com/security/cve/CVE-2020-15229
suse.com/security/cve/CVE-2021-29136
suse.com/security/cve/CVE-2021-32635