People coming for Hajj or Umrah are not allowed to work either voluntarily or with pay. Saudi government treats each individual very seriously.
Around ten years ago, people used to come on visit visa and work without any problem but things are different nowadays. The Saudi government authorized agencies in every country and they will be accountable if an Umrah visitor does not go back from Saudi Arabia in a given time.
Hence, Umrah and Hajj visitors who will be caught by the government working somewhere or overstayed pilgrims will be penalized in the following way: