It is difficult to say which Hindu text mention them for the first time.But they do mention about the Shada Ripus or the six enemies of mankind.They are better(or also) known as Ari Shad Vargas.(Ari=Enemy,Shad=Six)
They are:
Arishad vargas: or Shat Gunas: Kaama or Desire, Krodha or Anger,
Lobha or Avarice, Moha or Infatuation, Mada or Ego, Matsarya or
Jealousy.
For the time being i am only able to quote from the Bhavisya Purana which mention them in the context of Brahmachari duties(duties of a celibate life ,life of a student):
Needless to emphasise that a Brahmachari should get rid of meat, madya
(intoxicants), gandha or scented bases, flower garlands, violence,
body-decoratives and scents, footwear, umbrellas, dance and music
other than for religious purposes. The other taboos include
Asatya(utterances of lies), Asteya (stealing), Para Ninda(criticism of
others), company of women and involvement of Arishad -vargas or the
Six Enemies of human beings like desire, anger, greed, attachment, ego
and envy
But,i am quite sure that,besides Bhavisya Purana, they find mention in many other Hindu Shastras as well.I'll try to search for the same and update my answer if and when i find them.
Update- Here is a not-so-direct reference to Arishadavargas from "Apara Stuti of Shiva by Maha Rishis at Darukavana" found in the Linga Purana:
Sarvathaa vartamaanopi yoyo Bhaavo Bhavishyati, Twaameva thatr
prashamo Brahmanaa tathitam tathaa/
Kaamah krodhasccha lobhascha vishaado Mada yeva cha, yatadicchaamahe bodhum praseeda Parameswara
Our venerations to you Mahadeva! As you are devoid of the
‘Shatvargas’or the Six Enemies of humanity viz. Kama-Krodha-
Lobha-Moha-Mada and Matsaraas or Lust-Anger-Greed-Attachment-Pride and
Envy, besides Vishada or Grief. Parama Shiva!
Further from Hindupedia.com we find the following additional information:
Ariṣaḍvarga literally means ‘group of six enemies
Religion has always considered mokṣa or liberation from transmigratory
existence, as the real and the ultimate goal of life. Since this is
got by realising the ātman - one’s true Self already present in
everyone but covered over by various impurities of the mind, it is
first necessary to efface them.
These impurities of mind, which act as ‘ari’ or an enemy in the path
of spiritual evolution, are generally classed into six varieties and
are called ‘ariṣaḍvarga’, the group of six enemies. They are :
Kāma - Lust
Krodha - Anger
Lobha - Avarice
Moha - Delusion
Mada - Arrogance
Mātsarya - Jealousy
Some of the treatises of Vedānta like the Jivanmuktiviveka of
Vidyāraṇya (14th century A. D.) deal with the methods of eradicating
them. According to the teachers of bhakti or devotion, these six
passions can be eliminated by nāmajapa (repetition of the divine name)
and upāsanā (meditation on God) or sublimated by directing them
towards God Himself!