CAPEC Definitions

    CAPEC Definitions / CAPEC-84

    CAPEC-84: XQuery Injection

    This attack utilizes XQuery to probe and attack server systems; in a similar manner that SQL Injection allows an attacker to exploit SQL calls to RDBMS, XQuery Injection uses improperly validated data that is passed to XQuery commands to traverse and execute commands that the XQuery routines have access to. XQuery injection can be used to enumerate elements on the victim's environment, inject commands to the local host, or execute queries to remote files and data sources.

    Severity:Very High
    Possibility:High

    Extended Description

    No Extended Description.

    Mitigations

    Design: Perform input allowlist validation on all XML input

    Implementation: Run xml parsing and query infrastructure with minimal privileges so that an attacker is limited in their ability to probe other system resources from XQL.

    Relationships with other CAPECs

    CAPEC-250: XML Injection

    Prerequisites

    The XQL must execute unvalidated data

    Related Weaknesses

    CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

    CWE-707: Improper Neutralization