Fifth Veda
The notion of a fifth Veda (Sanskrit: pañcama veda), that is, of a text which lies outside the four canonical Vedas, but nonetheless has the status of a Veda, is one that has been advanced in a number of post-Vedic Hindu texts, in order to accord a particular text or texts and their doctrines with the timelessness and authority that Hinduism associates with the Vedas. The idea is an ancient one, appearing for the first time in the Upanishads, but has over the centuries since then also been applied to more recent Sanskrit and vernacular texts.
Sanskrit texts: the "Panchama Veda"
The earliest reference to a fifth Veda is found in the Chandogya Upanishad (7.1.2), which applies the term to the "histories" (Itihasa-Purana, "ancient traditions") of its day,
This reference to itihasa was used by the Mahabharata, which belonged to the class of epic literature called "itihasa", to refer to itself as the fifth Veda. Relying also on its attribution to Vyasa, the legendary compiler of the Vedas, the Mahabharata declares itself a new Veda for a new era, intended for all people, and which is the equal of, and in some ways superior to, the four canonical Vedas. The other major Hindu epic, the Ramayana, also makes a claim to be the fifth Veda.