Cerebral arteriovenous malformation is a congenital pathology of development, in which the arterial and venous blood channels are connected by a nidus of randomly interwoven degenerate vessels. This is a dangerous disease that affects brain functioning and the risk of intracerebral hemorrhage is high. One of AVM treatment methods is embolization - the endovascular filling of the AVM vessel bundle with a special embolic agent. This method is widely used, but still in some cases is accompanied by intraoperative rupture of AVM vessels. In this paper, the optimal scenario of AVM embolization is studied from the point of view of safety and effectiveness of the procedure. The joint movement of blood and embolic agent in the AVM body is modeled on the basis of a one-dimensional two-phase filtration model. In numerical analysis, the modification of the CABARET scheme is used. On the basis of clinical data, models for three real patients are constructed. For a special law of embolic agent delivery, acceptable and optimal scenarios of embolization are calculated.