An object of the present invention is to provide an imaging system, a control device, a control method, and a control program capable of obtaining an image with proper brightness regardless of classifications of light sources. An endoscope system 1 according to the invention includes an endoscope 2 that includes an image sensor 22 provided with an electronic shutter function and captures a subject, a first light source 351 and a second light source 52 of an external light source device 5 that emit illumination light configured to illuminate the subject, a light source identification unit 371 that identifies a classification of a light source used for observation, and an electronic shutter controller 375 that controls the electronic shutter function of the image sensor 22 based on a control pattern according to the classification of the light source identified by the light source identification unit 371.