A search for a very light Higgs boson decaying into a pair of tau leptons is presented within the framework of the next-to-minimal supersymmetric standard model. This search is based on a data set corresponding to an integrated luminosity of 19.7 fb(-1) of proton-proton collisions collected by the CMS experiment at a centre-of-mass energy of 8 TeV. The signal is defined by the production of either of the two lightest scalars, h(1) or h(2), via gluon-gluon fusion and subsequent decay into a pair of the lightest Higgs bosons, a(1) or h(1). The h(1) or h(2) boson is identified with the observed state at a mass of 125 GeV. The analysis searches for decays of the a(1) (h(1)) states into pairs of tau leptons and covers a mass range for the a(1) (h(1)) boson of 4 to 8 GeV. The search reveals no significant excess in data above standard model background expectations, and an upper limit is set on the signal production cross section times branching fraction as a function of the a(1) (h(1)) boson mass. The 95% confidence level limit ranges from 4.5 pb at m(a1) (m(h1)) = 8 GeV to 10.3 pb at m(a1) (m(h1)) = 5 GeV.