Aims. We present the spectroscopic characterization of the unusual high-amplitude very low mass pre-main-sequence periodic variable CHS 7797. Methods. This study is based on optical medium-resolution (R = 2200) spectroscopy in the 6450−8600 Å range, carried out with GMOS-GEMINI -S in March 2011. Observations of CHS 7797 have been carried out at two distinct phases of the 17.8 d period, namely at maximum (I ≈ 17.4 mag) and four days before maximum (I ≈ 18.5 mag). Four different spectral indices were used for the spectral classification at these two phases, all of them well-suited for spectral classification of young and obscured late M dwarfs. In addition, the gravity-sensitive Na I (8183/8195 Å) and K I (7665/7699 Å) doublet lines were used to confirm the young age of CHS 7797. Results. From the spectrum obtained at maximum light we derived a spectral type (SpT) of M 6.05 ± 0.25, while for the spectrum taken four days before maximum the derived SpT is M 5.75 ± 0.25. The derived SpTs confirm that CHS 7797 has a mass in the stellar-substellar boundary mass range. In addition, the small differences in the derived SpTs at the two observed phases may provide indirect hints that CHS 7797 is a binary system of similar mass components surrounded by a tilted circumbinary disk, a system similar to KH 15D.