thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Advanced

XPath Injection

Injection that modifies XPath queries against XML data by inserting crafted input.

Definition

Like SQL injection, concatenating input into XPath expressions can bypass authentication or extract XML content. Defenses include parameterized XPath (variable resolvers), input validation and avoiding XML as a credential store.

Example

An XML-backed login builds an XPath query from username and password strings.

Exam tip

Same root cause and fix as SQL injection: separate code from data.

Related terms