定番の脆弱性 › CVE-2020-1938
Ghostcat(CVE-2020-1938)
この解説はAIを使用して作成しています。誤りを含む可能性があり、内容は保証できません。必ず公式情報をご確認ください。
公開日:
過去の事例 この記事は過去に話題になった脆弱性の解説です。現在の状況は公式情報でご確認ください。
基本情報(データから表示)
| 通称 | Ghostcat |
|---|---|
| CVE番号 | CVE-2020-1938 |
| いつ起きたか | NVD に登録された日: 2020-02-24 KEV に追加された日: 2022-03-03 |
| 製品 | Apache Tomcat |
| 深刻度(CVSS) | 9.8 緊急CVSS v3.1 NVD による評価 詳細(ベクター)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| ランサムウェアでの悪用 | 不明(確認されていない) |
| 弱点の種類(CWE) | 不明 |
何が起きた
Ghostcatと呼ばれる、Apache Tomcatの弱点です。実際に悪用が確認されています。離れた場所から、特別な権限を持たない攻撃者でも悪用できる状態でした。TomcatはAJPという接続の方法を、ふつうのHTTPの接続より信頼して扱うため、AJPのポートに接続できる攻撃者は、ウェブアプリケーション内のファイルを読み取ったり、ファイルをJSPとして実行させたりできました。ファイルのアップロードを受け付けるアプリでは、遠隔からプログラムを実行されるおそれもありました。
攻撃の流れ
データをもとに、AIを使用して作成した図です。実際の攻撃は、これと異なる場合があります。
誰が影響を受ける
Apache Tomcatを使っている組織や人が影響を受けます。影響を受けるバージョンは、9.0.0.M1から9.0.30まで、8.5.0から8.5.50まで、7.0.0から7.0.99までです。特に、AJPのポートに信頼できない相手が接続できる状態だと危険です。
何をすればいい
今でも古いバージョンが使われていないか確認してください。AJPを使っていなければAJPのコネクタ(接続の受け口)を無効にし、使う場合は信頼できない相手から接続できないようにします。あわせて、9.0.31、8.5.51、7.0.100以降に更新してください。更新するとAJPの設定を少し変える必要がある場合があるので、公式の案内も確認しましょう。
やることチェックリスト
- 使っていないAJPのコネクタを無効にする
- 信頼できない相手からAJPに接続させない
- 9.0.31、8.5.51、7.0.100以降に更新する
用語メモ
- AJP
- Tomcatと、その前に置いたウェブサーバーなどをつなぐための通信の方法(Apache JServ Protocol)です。
- JSP
- Javaで書かれた、ウェブページを作るためのプログラムのファイルです。
- ポート
- コンピュータが通信を受け付ける窓口のことで、番号で区別されます。
元データ(英語)
Apache Tomcat Improper Privilege Management Vulnerability
概要(CISA KEV)
Apache Tomcat treats Apache JServ Protocol (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.
説明(NVD)
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.