ドイツの研究者グループが、現在最も普及している電子メールクライアントや電子メールサーバーに搭載されているSTARTTLS機能の実装に40以上のセキュリティ上の欠陥を発見したと発表しました。

STARTTLSによる接続のアップグレードは脆弱であり、多くのセキュリティ脆弱性や攻撃を受けやすいものとなっています。
我々は、STARTTLSの実装に40以上の脆弱性を発見しました。
これらの脆弱性は非常に一般的であるため、可能な限りSTARTTLSの使用を避けることを推奨すると結論付けています。
STARTTLSは「Opportunistic TLS」とも呼ばれ、POP3、IMAP、SMTPなどの旧来の電子メールプロトコルを平文接続によるデータ送信からTLSによる安全な暗号化するために、電子メールクライアントやサーバーが使用する一連の拡張機能のことを指します。
90年代後半に開発されたSTARTTLSは、TLSによる接続が可能かどうかをチェックし、メールデータを送信する前にTLS接続をネゴシエートするという仕組みになっています。
STARTTLSが登場した当時は、電子メールクライアントや電子メールサーバで暗号化された接続が広くサポートされておらず、当時は他に良い方法がなかったため、ほとんどのユーザーやサーバー管理者はTLSサポートがインターネット上で広く普及するまでの一時的な解決策としてSTARTTLSを有効にすることを選択することが一般的でした。
STARTTLSモードからTLSオンリーモードへの移行を推奨
あwんじる開催されたUSENIX 2021セキュリティカンファレンスで発表された研究によると、STARTTLSのクライアントおよびサーバーの実装に40以上の脆弱性が見つかったと発表されました。
これらの脆弱性を悪用して、STARTTLS接続を平文形式にダウングレードしたり、電子メール通信を傍受したり、パスワードを盗んだり、電子メールの受信箱を改ざんしたりすることが可能となります。
これらの攻撃はSTARTTLSの最初のネゴシエーションのやりとりするために、MitM(Man/Meddler-in-the-Middle)を利用しますが、研究チームは「これらの脆弱性は非常に一般的なものであるため、可能な限りSTARTTLSの使用を避けることをお勧めします」と述べており、ユーザーや管理者は、できるだけ早くクライアントやサーバーをTLSのみの接続を使用するようにアップデートする必要があるとしています。
すでに研究者が過去数ヶ月間の間にメールクライアントやサーバーのベンダーと協力し、発見した40以上の脆弱性にパッチを当てたことです。
ユーザはこれらのパッチを適用し、STARTTLSを使い続けることで脆弱性攻撃から防御できるという選択肢もありますが、研究者はクライアントやサーバーの設定を更新し、メール通信のセキュリティ設定をデフォルトでTLSのみに設定するようアドバイスしています。
これは他のセキュリティ専門家もすでに2014年から推奨していることです。
研究チームが発見した問題点と影響を受けるメールクライアントおよびメールサーバーは以下の通りです
Response Injection (Buffering)
Product | Protocol | Status | Links |
---|---|---|---|
Apple Mail (macOS) | SMTP/POP3/IMAP | Fixed in macOS High Sierra 10.13.6/Big Sur 11.4 | CVE-2020-9941, CVE-2021-30696 |
Apple Mail (iOS/iPadOS) | SMTP/POP3/IMAP | Fixed in iOS/iPadOS 14.0 | CVE-2020-9941 |
Mozilla Thunderbird | IMAP | Fixed in 78.7.0 | CVE-2020-15685, Vendor advisory, Bug report (restricted) |
Claws Mail | SMTP/POP3/IMAP | Fixed in 3.17.6 for SMTP/POP3, See libEtPan for IMAP | CVE-2020-15917 |
Mutt | IMAP/SMTP/POP3 | Fixed in 1.14.4 | CVE-2020-14954 |
NeoMutt | IMAP/SMPT/POP3 | Fixed in 2020-06-19 | Commit/Patch, see also CVE-2020-14954 |
Evolution | SMTP/POP3 | Fixed in 3.36.4 (evolution-data-server) | CVE-2020-14928 |
LibEtPan (Mail Framework for C Language) | IMAP/SMTP/POP3 | Fixed in repository, unreleased | CVE-2020-15953 |
Exim (MTA sending) | SMTP | Unfixed (reported privately) | – |
Gmail (iOS/iPadOS) | SMTP/IMAP | Unfixed (reported privately) | – |
Mail.ru, MyMail | SMTP | Unfixed (reported privately, report closed as not applicable) | – |
Yandex | SMTP/IMAP | Unfixed (reported privately) | – |
PHP (stream_socket_enable_crypto) | SMTP/POP3/IMAP | Unfixed | Bug report (private) |
Negotiation and Tampering bugs
Product | Description | Protocol | Status | Links |
---|---|---|---|---|
Gmail (Android) | Leak of emails | IMAP | Fixed (retested in 2021.07.11.387440246) | – |
Gmail (Go) | Leak of emails | IMAP | Fixed (retested in 2020.10.15.341102866) | – |
Samsung Email | Leak of emails | IMAP | Fixed (untested) | – |
Alpine | Untagged responses accepted before STARTTLS | IMAP | Unknown (reported via email) | – |
Trojitá | Untagged responses accepted before STARTTLS | IMAP | Unknown | Bug report |
Mozilla Thunderbird | Server responses prior to STARTTLS processed | IMAP | Fixed in 78.12 | CVE-2021-29969, Vendor advisory |
KMail | STARTTLS ignored when “Server requires authentication” not checked | SMTP | Unknown | Bug report |
Sylpheed | STARTTLS stripping | IMAP | Unknown | Bug report |
OfflineIMAP | STARTTLS stripping | IMAP | Unknown | Bug report |
GMX / Web.de Mail Collector | STARTTLS stripping | POP3/IMAP | Fixed | – |
Mail.ru, MyMail, Email app for Gmail | STARTTLS Stripping | SMTP | Unfixed (report closed as not applicable) | – |
Avoiding Encryption via IMAP PREAUTH
Product | Status | Links |
---|---|---|
Apple Mail (iOS/iPadOS) | Reported February 2020, Re-reported August 2021, Unfixed | – |
Mozilla Thunderbird | Fixed in 68.9.0 | CVE-2020-12398 |
Alpine | Fixed in 2.23 | CVE-2020-14929, Commit |
Mutt | Fixed in 1.14.3 | CVE-2020-14093 |
NeoMutt | Fixed in Release 2020-06-19 | Commit/Patch, see also CVE-2020-14093 |
GMX / Web.de Mail Collector | Fixed | – |
Certificate Validation
Product | Protocol | Description | Status | Links |
---|---|---|---|---|
OfflineIMAP | IMAP | Accepts untrusted certificates | Unknown | Bug report |
GMX / Web.de Mail Collector | POP3/IMAP | Accepts untrusted certificates | Still allows self-signed | – |
Yandex | SMTP/IMAP | Accepts untrusted certificates | Unknown (report closed as not eligible) | – |
Mail.ru, MyMail | SMTP | Accepts untrusted certificates (SMTP, IMAP) | Unknown (report closed as duplicate) | – |
Outlook (Android & iOS) | SMTP/IMAP | Certificate hostname not checked (SMTP, IMAP) | Unknown (report closed as low/medium severity) | – |
Geary | SMTP/IMAP | Accepting an untrusted certificate creates a permanent trust exception for all certificates | Fixed in 3.36.3 | CVE-2020-24661 |
Trojitá | SMTP | Accepts untrusted certificates | Fixed in repository (77ddd5d4) (no official releases) | CVE-2020-15047 |
Ruby Net::SMTP | SMTP | Only checks hostname, ignores certificate signature | Fixed in 2.7.2 | Bug report |
Crashes
Product | Protocol | Description | Status | Links |
---|---|---|---|---|
Alpine | IMAP | Crash when LIST or LSUB send before STARTTLS | Unknown (reported via email) | – |
Balsa | IMAP | Nullptr dereference when TLS required and PREAUTH send | Fixed in 2.5.10 | CVE-2020-16118 |
Balsa | IMAP | Stack overflow due to repeated BAD answer to CAPABILITY command | Fixed in 2.6.2 (no release yet) | Bug Report |
Balsa | IMAP | Crash on untagged EXPUNGE response | Fixed in commit 26e554ac (no release yet) | Bug Report |
Evolution | IMAP | Invalid free when no auth mechanisms in greeting | Fixed in >3.35.91 | CVE-2020-16117 |
Miscellaneous
Product | Protocol | Description | Status | Links |
---|---|---|---|---|
KMail | POP3 | Setup wizard in POP3 defaults to unencrypted connections | Fixed in 20.08 | Bug Report |
KMail | POP3 | Config shows “encrypted”, but it isn’t | Fixed | CVE-2020-15954 |
KMail | SMTP/IMAP | Dialog loop “forces” the user to accept invalid certificates | Unknown | Bug Report |
Mozilla Thunderbird | POP3 | Infinite loop when POP3 server replies with -ERR to STLS command | Unknown | Bug Report |
Trojitá | SMTP/IMAP | Hard to choose implicit TLS due to typo (German) | Fixed | Bug Report |
Trojitá | SMTP | SMTP defaults to plaintext on port 587 | Unknown | Bug Report |
Command Injection (Buffering)
Product | Protocol | Status | Links |
---|---|---|---|
Nemesis (used by GMX / Web.de, provider) | POP3/IMAP | Fixed (reported privately) | – |
Interia.pl (provider) | SMTP/POP3/IMAP | Fixed (reported privately) | – |
Yahoo (only MTA-to-MTA, provider) | SMTP | Unfixed (reported privately) | – |
Yandex (provider) | SMTP/POP3/IMAP | Unfixed (reported privately) | – |
s/qmail | SMTP | Fixed in 4.0.09 | CVE-2020-15955 |
Coremail | SMTP/POP3/IMAP | Unfixed (reported via CERT) | – |
Citadel | SMTP/POP3/IMAP | Unfixed | CVE-2020-29547, Bug report |
Gordano GMS | POP3/IMAP | Unfixed | CVE-2021-37844 |
recvmail | SMTP | Fixed in 3.1.2 (reported privately) | – |
SmarterMail | POP3 | Fixed in Build 7537 | CVE-2020-29548 |
Burp Collaborator | SMTP | Fixed in 2020.9.2 | Bug report, Vendor release notes |
Dovecot | SMTP | Fixed in 2.3.14.1 and 2.3.15 | CVE-2021-33515 |
Mercury/32 | SMTP/POP3/IMAP | Fixed in 4.90 | CVE-2021-33487 |
QMail Toaster (1.4.1) | SMTP | Project discontinued | – |
Courier | POP3 | Fixed in 1.1.5 (reported privately), known since 2013 | Discussion from 2013, CVE-2021-38084, Fix |
PHP (stream_socket_enable_crypto) | SMTP/POP3/IMAP | Unfixed | Bug report (private) |
Session Fixation
Product | Protocol | Status | Links |
---|---|---|---|
Citadel | POP3/IMAP | Reported via forum, unfixed | Forum with report, CVE-2021-37845 |
IPswitch IMail | POP3/IMAP | Reported via Mail, unfixed | CVE-2021-37846 |
Miscellaneous Issues
Product | Protocol | Description | Status | Links |
---|---|---|---|---|
Nemesis (used by GMX / Web.de, provider) | SMTP | Advertises authentication before STARTTLS even though it is disabled | Fixed (reported via Bugbounty) | – |
Comments