Quran's warning against forgery
The Quran condemns people who write scriptures with their own hands and then claim it is from god. This is considered by some Islamic apologists as a reason to trust that the Quran is from god, because if Muhammad was the author of the Quran and he attributed the authorship to god, he would contradict his own teachings that are in his Quran.
So woe to those who write the "scripture" with their own hands, then say, "This is from Allah," in order to exchange it for a small price. Woe to them for what their hands have written and woe to them for what they earn.
It was common in ancient times to make forgeries. Famous 2nd century physician Galen in his lifetime found a lot of forgeries written in his name on the market, which forced him to write a book about it named "On my own books". It was also not special for a forgery to include warning against forgeries. This was actually a method for raising credibility of the forgeries. So warning against forgeries is not something a forgery wouldn't say.
For example, there is a 4th century forgery named "Apostolic Constitutions" which pretended to be written by the 12 apostles of Jesus. It includes warnings against forgeries and condemns people who make them. It also talks about how the evil forgeries are widespread:
Concerning Books with False Inscriptions.
XVI. We have sent all these things to you, that you may know our opinion, what it is; and that you may not receive those books which obtain in our name, but are written by the ungodly. For you are not to attend to the names of the apostles, but to the nature of the things, and their settled opinions. For we know that Simon and Cleobius, and their followers, have compiled poisonous books under the name of Christ and of His disciples, and do carry them about in order to deceive you who love Christ, and us His servants. And among the ancients also some have written apocryphal books of Moses, and Enoch, and Adam, and Isaiah, and David, and Elijah, and of the three patriarchs, pernicious and repugnant to the truth. The same things even now have the wicked heretics done, reproaching the creation, marriage, providence, the begetting of children, the law, and the prophets; inscribing certain barbarous names, and, as they think, of angels, but, to speak the truth, of demons, which suggest things to them: whose doctrine eschew, that you may not be partakers of the punishment due to those that write such things for the seduction and perdition of the faithful and unblameable disciples of the Lord Jesus.
The Quran condemns those who write fake revelations in a similar way as this book condemns those who write fake apostolic traditions.