Overstaying a visa to perform Umrah or Hajj 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 Hajj or Umrah 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 Hajj or Umrah visa, they should wait until they can travel legally. Hajj is only obligatory 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 forbidden 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 Umrah or Hajj itself is accepted.