Nonce Length Vulnerability in OpenSSL and File Packages
Summary
ALPINE-CVE-2019-1543: ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input for every encryption operation. Affects file versions < 5.36-r0. Fixed in 5.36-r0. 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
OpenSSL is a widely used cryptographic library that provides a robust toolkit for implementing secure communication protocols. It supports various cryptographic algorithms and is integral to many applications for ensuring data integrity and confidentiality. The affected versions of OpenSSL (1.1.1 and 1.1.0) have a vulnerability related to the ChaCha20-Poly1305 cipher, which can lead to serious security risks if not addressed. The 'file' package, which is also impacted, is a utility that determines file types and provides information about file formats.
Vulnerability Detail
The vulnerability arises from OpenSSL's handling of nonce values in the ChaCha20-Poly1305 cipher. It allows for a variable nonce length, but only the last 12 bytes are significant, leading to potential reuse of nonce values. This can result in severe confidentiality and integrity attacks if applications inadvertently use non-unique nonce values. The issue is particularly concerning for applications that modify nonce lengths, as they may mistakenly believe they are generating unique nonces. The vulnerability has been assessed with a CVSS score of 7.4, indicating a high severity level.
How To Fix
Minimum fixed version
5.36-r0
This is the first release that contains the fix.
sudo apk add --upgrade file
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using nonce lengths longer than 12 bytes in applications that utilize the ChaCha20-Poly1305 cipher. Ensure that nonce values are unique and adhere to the recommended length to mitigate the risk of nonce reuse.
Conclusion
The nonce length vulnerability in OpenSSL poses significant risks to applications that utilize the ChaCha20-Poly1305 cipher. It is crucial to update to the patched versions of OpenSSL and the 'file' package to ensure the integrity and confidentiality of your data. Implementing the recommended workarounds can help mitigate risks until updates are applied.
See every vulnerability recorded for file →
FAQ
The vulnerability can lead to serious confidentiality and integrity attacks if nonce values are reused, potentially compromising sensitive data.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
OpenSSL versions 1.1.1 and 1.1.0 are affected by this vulnerability.
Yes, the vulnerability is fixed in OpenSSL version 1.1.1c and later. Update your package to this version to mitigate the risk.
As a temporary measure, avoid using nonce lengths longer than 12 bytes and ensure nonce values are unique to reduce the risk of attacks.
References
Related vulnerabilities
Recent vulnerabilities recorded for file.