CVE-2020-1938 の詳細
CVEの情報
説明:
When using the Apache JServ Protocol (AJP), care must be taken when trusting incoming connections to Apache Tomcat. Tomcat treats AJP connections as having higher trust than, for example, a similar HTTP connection. If such connections are available to an attacker, they can be exploited in ways that may be surprising. In Apache Tomcat 9.0.0.M1 to 9.0.0.30, 8.5.0 to 8.5.50 and 7.0.0 to 7.0.99, Tomcat shipped with an AJP Connector enabled by default that listened on all configured IP addresses. It was expected (and recommended in the security guide) that this Connector would be disabled if not required. This vulnerability report identified a mechanism that allowed: - returning arbitrary files from anywhere in the web application - processing any file in the web application as a JSP Further, if the web application allowed file upload and stored those files within the web application (or the attacker was able to control the content of the web application by some other means) then this, along with the ability to process a file as a JSP, made remote code execution possible. It is important to note that mitigation is only required if an AJP port is accessible to untrusted users. Users wishing to take a defence-in-depth approach and block the vector that permits returning arbitrary files and execution as JSP may upgrade to Apache Tomcat 9.0.31, 8.5.51 or 7.0.100 or later. A number of changes were made to the default AJP Connector configuration in 9.0.31 to harden the default configuration. It is likely that users upgrading to 9.0.31, 8.5.51 or 7.0.100 or later will need to make small changes to their configurations.
CVE更新日: 2020-02-24 22:15:12.057000
CVSSバージョン: 3.1
CVSSスコア: 9.8
KEVの情報
KEV更新日: 2022-03-03
EPSSの情報
EPSSは脆弱性が今後30日以内に悪用される確率を予測するスコアリングシステムで、FIRST(Forum of Incident Response and Security Teams)が提供しています。
EPSSのスコアが高いということは、攻撃されるリスクが高いことを意味するので、早めの対策が必要です。
EPSSスコア: 0.992700000
EPSS更新日: 2026-10-16 00:00:00
SSVCの情報
SSVCはカーネギーメロン大学ソフトウェア工学研究所が提案する脆弱性の評価手法です。ステークホルダーごとに脆弱性対応の優先度を決定することを支援します。
本サイトでは、CVE、KEV、EPSSの内容からExploitation(悪用状況)、Technical Impact(技術的影響)、Automatable(自動攻撃の可否)を判定します。
Exploitation: active
Technical Impact: high
Automatable: True
本回答は、CVE-2020-1938(通称: Ghostcat)に関する調査結果をまとめたものです。
1. 脆弱性の概要
CVE-2020-1938は、Apache TomcatのAJP (Apache JServ Protocol) コネクタにおけるファイル読み取り/インクルージョンの脆弱性です。この脆弱性は「Ghostcat」と名付けられました。デフォルトでAJPコネクタが有効になっており、デフォルトのポート8009でリッスンしている場合、リモートの認証されていない攻撃者がこれを悪用して、脆弱なサーバーからWebアプリケーションのファイルを読み取ることが可能です。
さらに、脆弱なサーバーがファイルのアップロードを許可している場合、攻撃者はさまざまなファイルタイプ内に悪意のあるJavaServer Pages (JSP) コードをアップロードし、この脆弱性を利用してリモートコード実行 (RCE) を達成する可能性があります。
1.1 影響 攻撃者は、Webアプリケーション内の任意のファイル(設定ファイル、ソースコードなど)を読み取ることができます。 また、Webアプリケーションがファイルアップロードを許可しているなど、特定の条件下では、攻撃者が任意のコードを実行し、システムを完全に制御する可能性があります。
1.2 深刻度 この脆弱性は、CVSSv3スコアで「High (高)」または「Critical (緊急)」と評価されることがあります。 例えば、Red HatはCVSSv3スコア7.6 (AV:A/I:L/A:L) と評価していますが、NVDとは異なるスコアです。 GitHub Advisory Databaseでは、CVSS全体スコアで機密性、完全性、可用性の全てがHighと評価されています。
2. 対象となる環境
2.1 影響を受けるOSバージョン 直接的に特定のOSバージョンに限定されるものではなく、Apache Tomcatが稼働している環境が対象となります。Red Hat Enterprise Linuxも影響を受けるプラットフォームとして挙げられています。
2.2 影響を受ける設定 Apache Tomcatの以下のバージョンが影響を受けます。 * Apache Tomcat 9.0.0.M1 から 9.0.30 まで * Apache Tomcat 8.5.0 から 8.5.50 まで * Apache Tomcat 7.0.0 から 7.0.99 まで * Apache Tomcat 6.x
この脆弱性は、AJPコネクタがデフォルトで有効になっており、デフォルトポート8009で設定されたすべてのIPアドレスをリッスンしている場合に発生します。
3. 影響を受けた時の兆候
web.xmlファイルなどの機密ファイルがリモートから取得される。/etc/passwdなどの内容が取得される。4. 推奨対策
4.1 本対策 ベンダーから提供されている修正プログラムを適用してください。 * Apache Tomcat 9.0.31 以降 * Apache Tomcat 8.5.51 以降 * Apache Tomcat 7.0.100 以降
修正版へのアップデートでは、セキュリティ強化のためAJPコネクタの初期設定が変更されており、例えば、AJPがLoopbackアドレスにバインドされるように修正されています。
4.2 暫定回避策(緩和策) 修正バージョンへのアップデートが困難な場合、以下の対策を実施することで脆弱性の影響を回避できます。
server.xmlファイル内でAJPコネクタを完全に無効にしてください。AJPを使用しない場合は、enabled="false"を設定するか、<Connector port="8009" ... />の部分をコメントアウトすることで無効化できます。requiredSecret属性を設定してAJPプロトコルの認証情報を設定し、信頼できるホストからの受信接続のみが許可されるように、ネットワークバインディングとファイアウォール設定を慎重に確認してください。 例:<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="YOUR_TOMCAT_IP_ADDRESS" secret="YOUR_TOMCAT_AJP_SECRET"/>これにより、AJPポートが信頼できないユーザーにアクセスされないようにすることが重要です。参照したサイト