Every CVE Search/ Get API key

CVE-2020-25040

Insecure permissions on build temporary rootfs in Singularity

8.8 HighFix available

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

2.04%Up 1.0 points since Apr 14, 2021
90%50%10%1%

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 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.5 MediumAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
github.com/sylabs/singularity
Go
before 3.6.3
3.6.3
singularity
Alpine:v3.19
before 3.6.3-r0
3.6.3-r0
singularity
Alpine:v3.20
before 3.6.3-r0
3.6.3-r0
singularity
Alpine:v3.21
before 3.6.3-r0
3.6.3-r0
singularity
Alpine:v3.22
before 3.6.3-r0
3.6.3-r0
singularity
Alpine:v3.23
before 3.6.3-r0
3.6.3-r0
singularity
Alpine:v3.24
before 3.6.3-r0
3.6.3-r0
singularity-container
Ubuntu: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-container
Ubuntu: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-container
Ubuntu:25.10
All versions, plus listed versions
4.1.5+ds4-1
None known
Show 5 moreShow less
Affected packages
PackageAffectedFixed
singularity-container
Ubuntu:26.04:LTS
All versions, plus listed versions
4.1.5+ds4-1
None known
singularity
openSUSE:Leap 15.1
From an advisory covering 2 CVEs
before 3.6.3-lp152.2.6.1
3.6.3-lp152.2.6.1
singularity
openSUSE:Leap 15.2
From an advisory covering 2 CVEs
before 3.6.3-lp152.2.6.1
3.6.3-lp152.2.6.1
singularity
SUSE: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
singularity
openSUSE:Tumbleweed
From an advisory covering 12 CVEs
before 3.8.3-1.2
3.8.3-1.2

History

History
RecordedChangedSources
affected, facts
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE 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

Show 19 moreShow less
MoveEnter Open