Those engines are designed to run at high RPM. They also come with an electronic rev limiter so you will not have an easy time getting the engine over the red line.
About the only way to overrev one of those bikes is to downshift into a gear too low while at a high rate of speed. That is generally not safe or smart to do anyway. Yamaha does not boast about a 13,000 RPM engine and expect riders to keep it down to 5K.