Information Exposure Affecting github.com/sylabs/singularity/internal/pkg package, versions >=3.2.0 <3.6.3


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.17% (55th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMSYLABSSINGULARITYINTERNALPKG-2322605
  • published21 Dec 2021
  • disclosed20 Dec 2021
  • creditUnknown

Introduced: 20 Dec 2021

CVE-2020-25039  (opens in a new tab)
CWE-668  (opens in a new tab)
CWE-732  (opens in a new tab)

How to fix?

Upgrade github.com/sylabs/singularity/internal/pkg to version 3.6.3 or higher.

Overview

Affected versions of this package are vulnerable to Information Exposure via insecure permissions on temporary directories used in fakeroot or user namespace container execution.

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.

Workaround

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.

CVSS Scores

version 3.1