Iran fought back to beat Bosnia 5-2 in a warm-up match, which raised serious questions about their defence in Germany.