Katalog CWE

CWE-652 · Słabość

Improper Neutralization of Data within XQuery Expressions ('XQuery Injection')

Abstrakcja
Bazowa
Status
Niekompletny
Ryzyko wykorzystania
wysokie
Dodano
30 stycznia 2008
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product uses external input to dynamically construct an XQuery 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).

Skutki

  • Confidentiality

    Read Application Data

    An attacker might be able to read sensitive information from the XML database.

Zapobieganie

  • Implementation

    Use parameterized queries. This will help ensure separation between data plane and control plane.

  • Implementation

    Properly validate user input. Reject data where appropriate, filter where appropriate and escape where appropriate. Make sure input that will be used in XQL queries is safe in that context.

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Not Language-Specific

Uwagi

This weakness is similar to other weaknesses that enable injection style attacks, such as SQL injection, command injection and LDAP injection. The main difference is that the target of attack here is the XML database.

Wpis z katalogu CWE 4.20.