The H-1B Cap Gap is a regulation which gives relief for those students who have made a timely application to change status to H-1B. The regulation states that duration of status and work authorization will be extended for a student on OPT, who is the beneficiary of a timely filed H-1B petition requesting an employment start date of October 1 of the following fiscal year. This applies to all students on OPT, not just STEM students. The extension of duration of status and work authorization would automatically terminate upon the rejection, denial, or revocation of the H-1B petition filed on the student's behalf. Extension of the I-20 to reflect the extension of work permission through October 1 is NOT REQUIRED but can be requested.
For more information, please see: USCIS H1B Cap Gap