Overstaying a visa to perform العمرة or الحج is not جائز عند 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).
الشيخ ابن باز stated that Muslims are obligated to honor their agreements and the laws of the countries they visit. He emphasized that performing الحج or العمرة 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 الحج or العمرة visa, they should wait until they can travel legally. الحج is only واجب on those who have the ability (istitaa'ah), and legal access to the country is part of that ability.
الشيخ ابن عثيمين reinforced that violating the visa terms is a form of deception (ghishsh) and betrayal of trust (khiyanah), both of which are محرم 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 العمرة or الحج itself is accepted.