Reputation: 61
My XML:
<?xml version="1.0"?>
<!DOCTYPE Input [
<!ELEMENT Input ANY >
<!ENTITY xxe SYSTEM "file:///c:/test.txt" >]>
<ExecutionParameters>
<Inputs>
<Input Name="Input1" Value="VALUE_OF_XXE"></Input>
</Inputs>
</ExecutionParameters>
I want to pass xxe (content of test.txt file) to the VALUE_OF_XXE.
Upvotes: 3
Views: 1284
Reputation: 111716
You cannot reference an external entity from an XML attribute value; this is not allowed:
<Input Name="Input1" Value="&xxe;"></Input>
Reference the external entity from an element value:
<Input Name="Input1" Value="">&xxe;</Input>
Reference an internal entity from an attribute value:
<!ENTITY xie "Some text here" >]>
Upvotes: 5