JPCERT コーディネーションセンター

Apache Struts 2 の脆弱性 (S2-048) に関する注意喚起

各位

JPCERT-AT-2017-0025
JPCERT/CC
2017-07-10(新規)
2017-07-11(更新)

JPCERT/CC Alert 2017-07-10


Apache Struts 2 の脆弱性 (S2-048) に関する注意喚起

https://www.jpcert.or.jp/at/2017/at170025.html

I. 概要Apache Software Foundation は、2017年7月7日 (米国時間) に ApacheStruts 2 の脆弱性 (CVE-2017-9791) に関する情報 (S2-048) を公開しました。2.3 系の Apache Struts 2 に含まれる Struts 1 Plugin を用いているStruts アプリケーションにおいて、入力値を適切に処理しなかった場合に、本脆弱性の影響を受けるとされています。本脆弱性を悪用された場合、リモートから攻撃者が、Apache Struts 2 が動作するサーバにおいて任意のコードを実行できる可能性があります。

脆弱性の詳細は、Apache Software Foundation からの情報を参照してください。

Apache Struts 2 Documentation
S2-048 : Possible RCE in the Struts Showcase app in the Struts 1 plugin example in Struts 2.3.x series
https://struts.apache.org/docs/s2-048.html

なお、2.3 系の Apache Struts 2 のサンプルアプリケーションであるshowcase に含まれる Struts アプリケーションが、本脆弱性の影響を受けると指摘されています。本脆弱性を実証するコードが既に公開されており、JPCERT/CC にて検証した結果、Apache Struts 2 (2.3.32) を使用するサーバにおいて、リモートから任意のコードが実行可能であることを確認しています。

脆弱性の影響を受けるバージョンの Apache Struts 2 を使用し、Sturts 1Plugin を利用して Struts アプリケーションを動作させている場合には、「III. 回避策」を参考に入力値の処理を適切に行うよう修正することを推奨します。


II. 対象次のバージョンの Apache Struts 2 が本脆弱性の影響を受けます。

- Apache Struts 2
- 2.3 系列

本脆弱性は、Struts アプリケーションを、Struts 1 Plugin を使用して動作させている場合に影響を受ける可能性があります。Struts アプリケーションに対する本脆弱性の影響について、詳細は Struts アプリケーションの開発者からの情報を参考にしてください。


III. 回避策Apache Software Foundation からは、回避策として入力値を適切に処理することが示されています。
** 更新: 2017年 7月11日追記・修正 ****************
showcase 内の Struts アプリケーションの修正方法として、ActionMessageクラスを用いた処理において、リソースキーを使用する方法が回避策として示されています。

※ showcase 内のサンプル Struts アプリケーションに対する回避策の例
(適用前)
messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " added successfully"));
(適用後)
messages.add("msg", new ActionMessage("struts1.gangsterAdded", gform.getName()));
**************************************************

なお、JPCERT/CC では、本回避策の適用後、本脆弱性に対する実証コードの実行により脆弱性を悪用されないことを確認しています。また、回避策の適用が難しい場合には、不特定多数からのアクセスを制限することや、WAF (WebApplication Firewall) の利用などの対策を検討してください。


IV. 参考情報
Apache Struts 2 Documentation
S2-048 : Possible RCE in the Struts Showcase app in the Struts 1 plugin example in Struts 2.3.x series
https://struts.apache.org/docs/s2-048.html

Apache Struts 2 Documentation
Struts 1 Plugin
https://struts.apache.org/docs/struts-1-plugin.html

JPCERT/CC
Java アプリケーション脆弱性事例解説資料
https://www.jpcert.or.jp/securecoding/materials-java-casestudies.html

JPCERT/CC
Java セキュアコーディングセミナー資料
https://www.jpcert.or.jp/securecoding/materials-java.html

JPCERT/CC
Java セキュアコーディングスタンダード CERT/Oracle 版
https://www.jpcert.or.jp/java-rules/

** 更新: 2017年 7月11日追記 ****************
JVNVU#99376481
Apache Struts2 の Struts1 プラグインを使用するアプリケーションに任意のコードが実行可能な脆弱性
https://jvn.jp/vu/JVNVU99376481/
**************************************************


今回の件につきまして当方まで提供いただける情報がございましたら、ご連絡ください。
________
改訂履歴
2017-07-10 初版
2017-07-11 「III. 回避策」および「IV. 参考情報」の追記・修正

==============================
一般社団法人 JPCERT コーディネーションセンター (JPCERT/CC)
MAIL: info@jpcert.or.jp
TEL:03-3518-4600 FAX: 03-3518-4602
https://www.jpcert.or.jp/
Topへ
最新情報(RSSメーリングリストTwitter