CVE-2020-27348: Vulnerability in snapcraft
Summary
CVE-2020-27348: In some conditions, a snap package built by snapcraft includes the current directory in LD_LIBRARY_PATH, allowing a malicious snap to gain code execution within the context of another snap if both plug the home interface... Affects snapcraft versions < 2.43.1. Fixed in 2.43.1. 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
Snapcraft is a tool used for building and packaging software as snaps, a universal Linux package format. It allows developers to easily distribute their applications across different Linux distributions. Snapcraft versions prior to 4.4.4, 2.43.1+16.04.1, and 2.43.1+18.04.1 are affected by a vulnerability that can lead to code execution within the context of another snap if both have access to the home interface or a similar interface.
Vulnerability Detail
The vulnerability arises from the inclusion of the current directory in the LD_LIBRARY_PATH environment variable when building a snap package using snapcraft. This can be exploited by a malicious snap to execute arbitrary code within the context of another snap. The issue can have serious consequences if both snaps have access to sensitive resources or interfaces. The vulnerability has been assigned the CVE identifier CVE-2020-27348.
How To Fix
Minimum fixed version
2.43.1
This is the first release that contains the fix.
pip install --upgrade "snapcraft==2.43.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability.
Conclusion
The vulnerability in snapcraft versions prior to 4.4.4, 2.43.1+16.04.1, and 2.43.1+18.04.1 allows a malicious snap to execute arbitrary code within the context of another snap. To mitigate this vulnerability, it is crucial to update snapcraft to the recommended versions. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for snapcraft →
FAQ
Snapcraft is a tool used for building and packaging software as snaps, a universal Linux package format.
LD_LIBRARY_PATH is an environment variable that specifies the search path for shared libraries. It is used by the dynamic linker/loader to locate shared libraries required by a program.
A malicious snap can exploit this vulnerability by gaining code execution within the context of another snap if both have access to the home interface or a similar interface.
The consequences of this vulnerability depend on the specific snaps involved. If both snaps have access to sensitive resources or interfaces, the malicious snap can potentially perform unauthorized actions or access confidential information.
Updating snapcraft to the recommended versions mentioned earlier will protect your system from this vulnerability. It is important to regularly update software to ensure the latest security patches are applied.
Related vulnerabilities
Recent vulnerabilities recorded for snapcraft.