Vulnerability in Singularity Package: Action Commands Against Library URIs Ignore Configured Remote Endpoint
Summary
GHSA-jq42-hfch-42f3: Action Commands (run/shell/exec) Against Library URIs Ignore Configured Remote Endpoint. Affects github.com/hpcng/singularity versions >= 3.7.2, < 3.7.4. Fixed in 3.7.4. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Singularity package is a Go-based tool used for building, running, and managing containers. It provides a platform for users to execute containerized applications securely. However, a vulnerability has been identified in Singularity versions 3.7.2 and earlier. This vulnerability affects action commands (run/shell/exec) that target containers using a library:// URI. The issue arises from the incorrect use of a default URL, which causes Singularity to always retrieve the container from the default remote endpoint (cloud.sylabs.io) instead of the configured remote endpoint. This vulnerability can potentially allow an attacker to push a malicious container to the default remote endpoint, leading to the execution of the malicious container when a victim with a non-default remote endpoint attempts to use the same URI.
Vulnerability Detail
The vulnerability in Singularity allows an attacker to exploit the incorrect use of a default URL when using action commands against library:// URIs. By pushing a malicious container to the default remote endpoint (cloud.sylabs.io), an attacker can trick a victim with a non-default remote endpoint into executing the malicious container. This can result in unauthorized code execution and potential compromise of the victim's system. It's important to note that other commands such as pull and push are not affected by this vulnerability and respect the configured remote endpoint.
How To Fix
Minimum fixed version
3.7.4
This is the first release that contains the fix.
go get github.com/hpcng/singularity@v3.7.4
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If users only interact with the default remote endpoint or do not use the library:// URL, they are not affected by this vulnerability. Additionally, installations with an execution control list configured to restrict execution to containers signed with specific secure keys are also not affected.
Conclusion
The vulnerability in Singularity that allows action commands against library:// URIs to ignore the configured remote endpoint can lead to the execution of malicious containers. It is crucial for users to upgrade to Singularity version 3.7.4 or later to mitigate this vulnerability. By following the recommended steps and staying informed about security updates, users can ensure the secure execution of containerized applications. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for github.com/hpcng/singularity →
FAQ
Singularity is a Go-based tool used for building, running, and managing containers. It provides a secure platform for executing containerized applications.
Singularity versions 3.7.2 and earlier are affected. Users should upgrade to version 3.7.4 or later to mitigate the vulnerability.
The vulnerability allows an attacker to execute unauthorized code by tricking a victim into using a malicious container. This can lead to potential compromise of the victim's system.
No, only action commands (run/shell/exec) against library:// URIs are affected. Commands such as pull and push respect the configured remote endpoint.
To protect against this vulnerability, it is recommended to upgrade to Singularity version 3.7.4 or later. Additionally, ensure that you only interact with trusted remote endpoints and avoid using the library:// URL if possible.
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/hpcng/singularity.