jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX XPath_Injection @ Content/XPathInjection.aspx.cs [master] #116

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

XPath_Injection issue exists @ Content/XPathInjection.aspx.cs in branch master

The application's FindSalesPerson method constructs an XPath query, for navigating an XML document. The XPath query is created with SelectNodes, at line 24 of Content\XPathInjection.aspx.cs, using an untrusted string embedded in the expression.   This may enable an attacker to modify the XPath expression, leading to an XPath Injection attack.    The attacker may be able to inject the modified XPath expression via user input, QueryString_state, which is retrieved by the application in the Page_Load method, at line 16 of Content\XPathInjection.aspx.cs. This value then flows through the code to SelectNodes, as noted.

Severity: High

CWE:643

Checkmarx

Lines: 20


Code (Line #20):

                FindSalesPerson(Request.QueryString["state"]);

jbruinaud commented 4 years ago

Issue still exists.

SUMMARY

Issue has total 1 vulnerabilities left to be fix (Please scroll to the top for more information)