Overstaying a visa to perform Umre or Hac is not permissible according to contemporary scholars. A visa is a form of covenant (ahd) and agreement between the traveler and the host country. When a person enters a country on a visa, they agree to abide by its terms, including the duration of stay. Violating this agreement is a breach of trust, which Islam prohibits. Allah says: 'O you who believe, fulfill your covenants' (Al-Ma'idah, 5:1).
Sheikh Ibn Baz stated that Muslims are obligated to honor their agreements and the laws of the countries they visit. He emphasized that performing Hac or Umre through illegal means does not fulfill the obligation properly, as the means to worship must also be lawful. If a person cannot obtain a proper Hac or Umre visa, they should wait until they can travel legally. Hac is only farz on those who have the ability (istitaa'ah), and legal access to the country is part of that ability.
Sheikh Ibn Uthaymeen reinforced that violating the visa terms is a form of deception (ghishsh) and betrayal of trust (khiyanah), both of which are haram in Islam. He stated that a Muslim's religion should make them the most trustworthy and law-abiding of people, not the least. The worship performed during an illegal overstay may be technically valid in terms of its rites, but the sin of violating the agreement remains on the person. The person bears sin for the violation even if the Umre or Hac itself is accepted.