This study will assess the safety and efficacy of vismodegib in patients with relapsed/refractory acute myelogenous leukemia (AML) and relapsed/refractory high-risk myelodysplastic syndrome (MDS). Patients in Cohort 1 will receive single-agent vismodegib 150 mg orally daily. In Cohort 2, patients will receive vismodegib 150 mg orally daily in combination with cytarabine 20 mg subcutaneously for 10 days.