Setting a timeout, maximum depth, or a query complexity threshold value should be an easy remediation against DoS.