JVNDB-2016-001459
|
Android Platform の URLConnection クラスに HTTP ヘッダインジェクションの脆弱性
|
Android Platform の URLConnection クラスには、HTTP ヘッダインジェクションの脆弱性が存在します。
Android Platform の URLConnection クラスは、Android のバージョンにより実装が異なっており Android 4.4.2 からは、オープンソースの OkHttp から取り込んだソースコードを使用しています。
OkHttp の 2.5.0 より前のバージョンには HTTP ヘッダインジェクションの脆弱性があります。
Android Platform では OkHttp 2.5.0 より前のバージョンのソースコードを取り込んでいる URLConnection クラスに同じ脆弱性が存在しています。
Android Platform の URLConnection.setRequestProperty() や URLConnection.addRequestProperty() を使っている実行環境では、アプリケーションが HTTP ヘッダを設定・追加する際に、外部から受け取った信頼できない値を検証しないまま使っていると HTTP ヘッダインジェクションが行なわれる可能性があります。
RFC 2616 の 2.2 Basic Rules によると HTTP ヘッダフィールド値は継続行が許可されています。
"HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal tab. All linear white space, including folding, has the same semantics as SP. A recipient MAY replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream."
RFC 2616 は RFC7230 から RFC7235 が発行された際に obsoleted になりました。
RFC 7230 の 3.2.4 Field Parsing によると message/http media type 以外は継続行が許可されなくなりました。
"Historically, HTTP header field values could be extended over multiple lines by preceding each extra line with at least one space or horizontal tab (obs-fold). This specification deprecates such line folding except within the message/http media type (Section 8.3.1). A sender MUST NOT generate a message that includes line folding (i.e., that has any field-value that contains a match to the obs-fold rule) unless the message is intended for packaging within the message/http media type."
|
CVSS v3 による深刻度 基本値: 9.8 (緊急) [NVD値]
- 攻撃元区分: ネットワーク
- 攻撃条件の複雑さ: 低
- 攻撃に必要な特権レベル: 不要
- 利用者の関与: 不要
- 影響の想定範囲: 変更なし
- 機密性への影響(C): 高
- 完全性への影響(I): 高
- 可用性への影響(A): 高
CVSS v2 による深刻度 基本値: 7.5 (危険) [IPA値]
- 攻撃元区分: ネットワーク
- 攻撃条件の複雑さ: 低
- 攻撃前の認証要否: 不要
- 機密性への影響(C): 部分的
- 完全性への影響(I): 部分的
- 可用性への影響(A): 部分的
|
|
Google
- Android 2.2 から 6.0 に含まれる URLConnection クラス
|
Android 2.2 より前のバージョンに含まれる URLConnection クラスも影響を受ける可能性があります。
|
想定される影響はアプリケーションによって異なりますが、表示されるページが改ざんされたり任意のスクリプトが実行されたり Cookie に任意の値を設定されたりする可能性があります。
|
[対策済みの OkHttp を使用する]
OkHttp では本脆弱性はバージョン 2.5.0 で修正されています。最新の OkHttp を使いアプリケーションを再実装することで対策を行う事が可能です。
Android Platform では、Android 6.0 をリリースした後に Github の master branch で OkHttp 2.5.0 の修正を取り込んでいます。
[ワークアラウンド]
Android Platform の URLConnection.setRequestProperty() や URLConnection.addRequestProperty() の引数として渡される文字列の中に、制御文字など不正な文字が含まれないように入力値検査を行ってください。
詳細は RFC7230 3.2.4 Field Parsing を参照してください。
|
Google
日本電気
|
- インジェクション(CWE-74) [NVD評価]
|
- CVE-2016-1155
|
- JVN : JVNVU#99757346
- National Vulnerability Database (NVD) : CVE-2016-1155
- 関連文書 : [Square / OkHttp] Change Log - Version 2.5.0
- 関連文書 : [Square / OkHttp] Non-ASCII Header Encoding Issues #891
- 関連文書 : Apache Cordova プラグイン cordova-plugin-file-transfer における HTTP ヘッダインジェクションの脆弱性 (JVN#21612597)
- 関連文書 : Android Platform の URLConnection クラスに HTTP ヘッダインジェクションの脆弱性
|
- [2016年02月19日]
掲載
[2017年05月23日]
CVSS による深刻度:内容を更新
CWE による脆弱性タイプ一覧:CWE-ID を追加
参考情報:National Vulnerability Database (NVD) (CVE-2016-1155) を追加
- [2018年03月29日]
ベンダ情報:日本電気 (NV18-007) を追加
|