Lucene search

K
osvGoogleOSV:GHSA-JV9C-W74Q-6762
HistoryMay 24, 2021 - 4:56 p.m.

Insecure permissions on build temporary rootfs in Singularity

2021-05-2416:56:23
Google
osv.dev
7
singularity
insecure permissions
build operations
arbitrary code execution
patch
upgrade
temporary directories
security policy

EPSS

0.003

Percentile

71.6%

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