A cable assembly (1) includes an insulated housing (2) having a base portion (21) and a mating portion (22) extending forwardly from the base portion; a plurality of terminals (3) received in the insulated housing; a retainer (214) formed on the base portion, said retainer defining a cavity (215) with a rear outlet; a sensor (7) accommodated in the cavity of the retainer; and a lid member (8) covering the rear outlet of the retainer.