We carry out a re-analysis of the photometric data in R _ { c } I _ { c } bands which was taken under the Nainital Microlensing Survey during 1998 to 2002 with the aim to detect gravitational microlensing events in the direction of M31 . Here , we do photometric analysis of a faint W UMa binary CSS\ _ J 004259.3 + 410629 identified in the target field . The orbital period of this star is found to be 0.266402 \pm 0.000018 day . The photometric mass ratio , q , is found to be 0.28 \pm 0.01 . The photometric light curves are investigated using the Wilson-Devinney ( WD ) code and absolute parameters are determined using empirical relations which provide masses and radii of the binary as M _ { 1 } = 1.19 \pm 0.09 M _ { \odot } , M _ { 2 } = 0.33 \pm 0.02 M _ { \odot } and R _ { 1 } = 1.02 \pm 0.04 R _ { \odot } , R _ { 2 } = 0.58 \pm 0.08 R _ { \odot } based on the R _ { c } band data . Almost similar values are found by analysing I _ { c } band data . From the photometric light curve examination , the star is understood to be a low mass-ratio over-contact binary of A-subtype with a high fill-out factor of about 47 % . The binary system is found to be located approximately at a distance of 2.64 \pm 0.03 kpc having a separation of 2.01 \pm 0.05 R _ { \odot } between the two components .