メールのSTARTTLS実装に40以上の脆弱性が存在することが判明:STARTTLSを使用しない

news

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

NO STARTTLS
We present multiple vulnerabilities related to the use of STARTTLS

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)

ProductProtocolStatusLinks
Apple Mail (macOS)SMTP/POP3/IMAPFixed in macOS High Sierra 10.13.6/Big Sur 11.4CVE-2020-9941CVE-2021-30696
Apple Mail (iOS/iPadOS)SMTP/POP3/IMAPFixed in iOS/iPadOS 14.0CVE-2020-9941
Mozilla ThunderbirdIMAPFixed in 78.7.0CVE-2020-15685Vendor advisoryBug report (restricted)
Claws MailSMTP/POP3/IMAPFixed in 3.17.6 for SMTP/POP3, See libEtPan for IMAPCVE-2020-15917
MuttIMAP/SMTP/POP3Fixed in 1.14.4CVE-2020-14954
NeoMuttIMAP/SMPT/POP3Fixed in 2020-06-19Commit/Patch, see also CVE-2020-14954
EvolutionSMTP/POP3Fixed in 3.36.4 (evolution-data-server)CVE-2020-14928
LibEtPan (Mail Framework for C Language)IMAP/SMTP/POP3Fixed in repository, unreleasedCVE-2020-15953
Exim (MTA sending)SMTPUnfixed (reported privately)
Gmail (iOS/iPadOS)SMTP/IMAPUnfixed (reported privately)
Mail.ru, MyMailSMTPUnfixed (reported privately, report closed as not applicable)
YandexSMTP/IMAPUnfixed (reported privately)
PHP (stream_socket_enable_crypto)SMTP/POP3/IMAPUnfixedBug report (private)

Negotiation and Tampering bugs

ProductDescriptionProtocolStatusLinks
Gmail (Android)Leak of emailsIMAPFixed (retested in 2021.07.11.387440246)
Gmail (Go)Leak of emailsIMAPFixed (retested in 2020.10.15.341102866)
Samsung EmailLeak of emailsIMAPFixed (untested)
AlpineUntagged responses accepted before STARTTLSIMAPUnknown (reported via email)
TrojitáUntagged responses accepted before STARTTLSIMAPUnknownBug report
Mozilla ThunderbirdServer responses prior to STARTTLS processedIMAPFixed in 78.12CVE-2021-29969Vendor advisory
KMailSTARTTLS ignored when “Server requires authentication” not checkedSMTPUnknownBug report
SylpheedSTARTTLS strippingIMAPUnknownBug report
OfflineIMAPSTARTTLS strippingIMAPUnknownBug report
GMX / Web.de Mail CollectorSTARTTLS strippingPOP3/IMAPFixed
Mail.ru, MyMail, Email app for GmailSTARTTLS StrippingSMTPUnfixed (report closed as not applicable)

Avoiding Encryption via IMAP PREAUTH

ProductStatusLinks
Apple Mail (iOS/iPadOS)Reported February 2020, Re-reported August 2021, Unfixed
Mozilla ThunderbirdFixed in 68.9.0CVE-2020-12398
AlpineFixed in 2.23CVE-2020-14929Commit
MuttFixed in 1.14.3CVE-2020-14093
NeoMuttFixed in Release 2020-06-19Commit/Patch, see also CVE-2020-14093
GMX / Web.de Mail CollectorFixed

Certificate Validation

ProductProtocolDescriptionStatusLinks
OfflineIMAPIMAPAccepts untrusted certificatesUnknownBug report
GMX / Web.de Mail CollectorPOP3/IMAPAccepts untrusted certificatesStill allows self-signed
YandexSMTP/IMAPAccepts untrusted certificatesUnknown (report closed as not eligible)
Mail.ru, MyMailSMTPAccepts untrusted certificates (SMTP, IMAP)Unknown (report closed as duplicate)
Outlook (Android & iOS)SMTP/IMAPCertificate hostname not checked (SMTP, IMAP)Unknown (report closed as low/medium severity)
GearySMTP/IMAPAccepting an untrusted certificate creates a permanent trust exception for all certificatesFixed in 3.36.3CVE-2020-24661
TrojitáSMTPAccepts untrusted certificatesFixed in repository (77ddd5d4) (no official releases)CVE-2020-15047
Ruby Net::SMTPSMTPOnly checks hostname, ignores certificate signatureFixed in 2.7.2Bug report

Crashes

ProductProtocolDescriptionStatusLinks
AlpineIMAPCrash when LIST or LSUB send before STARTTLSUnknown (reported via email)
BalsaIMAPNullptr dereference when TLS required and PREAUTH sendFixed in 2.5.10CVE-2020-16118
BalsaIMAPStack overflow due to repeated BAD answer to CAPABILITY commandFixed in 2.6.2 (no release yet)Bug Report
BalsaIMAPCrash on untagged EXPUNGE responseFixed in commit 26e554ac (no release yet)Bug Report
EvolutionIMAPInvalid free when no auth mechanisms in greetingFixed in >3.35.91CVE-2020-16117

Miscellaneous

ProductProtocolDescriptionStatusLinks
KMailPOP3Setup wizard in POP3 defaults to unencrypted connectionsFixed in 20.08Bug Report
KMailPOP3Config shows “encrypted”, but it isn’tFixedCVE-2020-15954
KMailSMTP/IMAPDialog loop “forces” the user to accept invalid certificatesUnknownBug Report
Mozilla ThunderbirdPOP3Infinite loop when POP3 server replies with -ERR to STLS commandUnknownBug Report
TrojitáSMTP/IMAPHard to choose implicit TLS due to typo (German)FixedBug Report
TrojitáSMTPSMTP defaults to plaintext on port 587UnknownBug Report

Command Injection (Buffering)

ProductProtocolStatusLinks
Nemesis (used by GMX / Web.de, provider)POP3/IMAPFixed (reported privately)
Interia.pl (provider)SMTP/POP3/IMAPFixed (reported privately)
Yahoo (only MTA-to-MTA, provider)SMTPUnfixed (reported privately)
Yandex (provider)SMTP/POP3/IMAPUnfixed (reported privately)
s/qmailSMTPFixed in 4.0.09CVE-2020-15955
CoremailSMTP/POP3/IMAPUnfixed (reported via CERT)
CitadelSMTP/POP3/IMAPUnfixedCVE-2020-29547Bug report
Gordano GMSPOP3/IMAPUnfixedCVE-2021-37844
recvmailSMTPFixed in 3.1.2 (reported privately)
SmarterMailPOP3Fixed in Build 7537CVE-2020-29548
Burp CollaboratorSMTPFixed in 2020.9.2Bug reportVendor release notes
DovecotSMTPFixed in 2.3.14.1 and 2.3.15CVE-2021-33515
Mercury/32SMTP/POP3/IMAPFixed in 4.90CVE-2021-33487
QMail Toaster (1.4.1)SMTPProject discontinued
CourierPOP3Fixed in 1.1.5 (reported privately), known since 2013Discussion from 2013CVE-2021-38084Fix
PHP (stream_socket_enable_crypto)SMTP/POP3/IMAPUnfixedBug report (private)

Session Fixation

ProductProtocolStatusLinks
CitadelPOP3/IMAPReported via forum, unfixedForum with reportCVE-2021-37845
IPswitch IMailPOP3/IMAPReported via Mail, unfixedCVE-2021-37846

Miscellaneous Issues

ProductProtocolDescriptionStatusLinks
Nemesis (used by GMX / Web.de, provider)SMTPAdvertises authentication before STARTTLS even though it is disabledFixed (reported via Bugbounty)

Comments

タイトルとURLをコピーしました