A quantum system composed of a molecule and an atomic ensemble, confined in a microscopic cavity, is investigated theoretically. The indirect coupling between atoms and the molecule, realized by their interaction with the cavity radiation mode, leads to a coherent mixing of atomic and molecular states, and at strong enough cavity field strengths hybrid atom-molecule-photon polaritons are formed. It is shown for the Na 2 molecule that by changing the cavity wavelength and the atomic transition frequency, the potential energy landscape of the polaritonic states and the corresponding spectrum could be changed significantly. Moreover, an unforeseen intensity borrowing effect, which can be seen as a strong nonadiabatic fingerprint, is identified in the atomic transition peak, originating from the contamination of the atomic excited state with excited molecular rovibronic states.