Vulnerability in bsd-mailx - security update
Summary
DSA-3104-1: bsd-mailx - security update. Affects bsd-mailx versions < 8.1.2-0.20111106cvs-1+deb7u1. Fixed in 8.1.2-0.20111106cvs-1+deb7u1. 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
bsd-mailx is an implementation of the mail command, providing functionality for sending and receiving emails from the command line. It is commonly used in Unix-like operating systems. However, an undocumented feature in bsd-mailx treats syntactically valid email addresses as shell commands to execute, posing a security risk.
Vulnerability Detail
The vulnerability in bsd-mailx allows an attacker to execute arbitrary shell commands by crafting a malicious email address. This can lead to unauthorized access, data leakage, and potential system compromise. The issue was addressed by removing the undocumented feature and the obsolete '-T' option. However, it is important to note that not all command execution facilities have been removed, and caution should be exercised when sending emails to addresses obtained from untrusted sources.
How To Fix
Minimum fixed version
8.1.2-0.20111106cvs-1+deb7u1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade bsd-mailx
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
A workaround for scripts that send mail to addresses obtained from untrusted sources is to use the '--' separator before the email addresses. Alternatively, the scripts can be modified to invoke 'mail -t' or 'sendmail -i -t', passing the recipient addresses as part of the mail header.
Conclusion
The vulnerability in bsd-mailx has been addressed through a security update. Users are advised to upgrade their bsd-mailx packages to the fixed version to mitigate the risk of unauthorized command execution. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for bsd-mailx →
FAQ
bsd-mailx is an implementation of the mail command, providing functionality for sending and receiving emails from the command line in Unix-like operating systems.
The vulnerability allows an attacker to execute arbitrary shell commands by crafting a malicious email address. This can lead to unauthorized access, data leakage, and potential system compromise.
To fix this vulnerability, it is recommended to upgrade the bsd-mailx package to version 8.1.2-0.20111106cvs-1+deb7u1 or later using the package manager of the Debian 7 (wheezy) distribution.
A workaround for scripts that send mail to addresses obtained from untrusted sources is to use the '--' separator before the email addresses. Alternatively, the scripts can be modified to invoke 'mail -t' or 'sendmail -i -t', passing the recipient addresses as part of the mail header.
For further information and support on vulnerability remediation, you can contact info@devnack.com.
Related vulnerabilities
Recent vulnerabilities recorded for bsd-mailx.