CWE一覧に戻る
CWE-943

データクエリロジックにおける特殊要素の不適切な中和

Improper Neutralization of Special Elements in Data Query Logic
脆弱性 作成中
JA

この製品は、データベースなどのデータストアにあるデータへのアクセスや操作を意図したクエリを生成しますが、クエリの意図したロジックを変更する可能性のある特殊な要素を無効化していないか、誤って無効化しています。

クエリー言語の機能によっては、攻撃者はクエリーに追加ロジックを注入することができる:

追加のコマンドを実行したり、返されるエンティティを変更したりする機能には、明らかなリスクがあります。しかし、製品ロジックがエンティティの順序や数に依存する場合、これも脆弱性につながる可能性があります。例えば、クエリが管理ユーザを指定する1つのエンティティだけを返すことを期待しているにもかかわらず、攻撃者がどのエンティティを返すかを変更できる場合、ロジックが一般ユーザの情報を返し、そのユーザが管理権限を持っていると誤って想定する可能性があります。

この弱点はSQLインジェクションに最もよく関連していますが、HTSQL、LDAP、DQL、XQuery、Xpath、"NoSQL "言語など、インジェクション攻撃の対象となるクエリ言語は他にもたくさんあります。

EN

The product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query.

Depending on the capabilities of the query language, an attacker could inject additional logic into the query to:

The ability to execute additional commands or change which entities are returned has obvious risks. But when the product logic depends on the order or number of entities, this can also lead to vulnerabilities. For example, if the query expects to return only one entity that specifies an administrative user, but an attacker can change which entities are returned, this could cause the logic to return information for a regular user and incorrectly assume that the user has administrative privileges.

While this weakness is most commonly associated with SQL injection, there are many other query languages that are also subject to injection attacks, including HTSQL, LDAP, DQL, XQuery, Xpath, and "NoSQL" languages.

Scope: Confidentiality, Integrity, Availability, Access Control / Impact: Bypass Protection Mechanism; Read Application Data; Modify Application Data; Varies by Context
MITRE公式ページ — CWE-943