This vulnerability could be exploited without authentication if Cacti is enabling “Guest Realtime Graphs” privilege, So in this case no need for the authentication part and you can just use the following code to exploit the vulnerability
Signed-off-by: GwanYeong Kim <gy741.kim@gmail.com>