CWE一覧に戻る
CWE-643

XPath 式内のデータの不適切な中和 ('XPath インジェクション')

Improper Neutralization of Data within XPath Expressions ('XPath Injection')
脆弱性 作成中
JA

この製品は、XML データベースからデータを取得するために使用される XPath 式を動的に構築するために外部入力を使用しますが、その入力を無効化しないか、または誤って無効化します。これにより、攻撃者はクエリの構造を制御することができます。

正味の効果は、攻撃者がXMLデータベースから選択された情報をコントロールできるようになり、その能力を使ってアプリケーションのフローを制御したり、ロジックを変更したり、不正なデータを取得したり、重要なチェック(認証など)をバイパスしたりできるようになることです。

EN

The product uses external input to dynamically construct an XPath expression used to retrieve data from an XML database, but it does not neutralize or incorrectly neutralizes that input. This allows an attacker to control the structure of the query.

The net effect is that the attacker will have control over the information selected from the XML database and may use that ability to control application flow, modify logic, retrieve unauthorized data, or bypass important checks (e.g. authentication).

Scope: Access Control / Impact: Bypass Protection Mechanism
Scope: Confidentiality / Impact: Read Application Data
Use parameterized XPath queries (e.g. using XQuery). This will help ensure separation between data plane and control plane.
Properly validate user input. Reject data where appropriate, filter where appropriate and escape where appropriate. Make sure input that will be used in XPath queries is safe in that context.
MITRE公式ページ — CWE-643