Is it a cooperate flight ?
For KSA you'll need a Saudi Visa.
If your way back s also over JEDDAH (jED),you need a Multi Entry Visa.
It usually takes 14 Days.
Without a valid Visa,boarding wll be denied in Cairo(CAI).
I strongly recomend to check with MS&SV(Saudia) if there is any special Procedure for Transfer Passengers.
Without avalid Visa,you can't enter KSA.
They are very restrictiv.
Keep me informed.
BR