The clip’s cover image was replaced with a photo showing a group of people wearing masks and pointing guns.
The video was temporarily taken offline until the problem was fixed.
But videos by more than a dozen other artists posted by the music hosting service Vevo – including Shakira, Selena Gomez, Drake and Taylor Swift – were also affected.
The hackers, calling themselves Prosox and Kuroi’sh, had replaced some of the videos’ titles with their own messages, including a call to “free Palestine” alongside their own nicknames.
“After seeing unusual upload activity on a handful of Vevo channels, we worked quickly with our partner to disable access while they investigate the issue,” a spokeswoman for YouTube told the BBC.
Vevo added: “We are working to reinstate all videos affected and our catalogue to be restored to full working order. We are continuing to investigate the source of the breach.”
Vevo previously experienced a breach in September 2017 when some of its files were stolen and leaked online.
A Twitter account that apparently belonged to one of the hackers had posted: “It’s just for fun, I just use [the] script ‘youtube-change-title-video’ and I write ‘hacked’.”
“Don’t judge me I love YouTube,” it added.
Cyber-security expert Prof Alan Woodward, from Surrey University, said it was unlikely that the hacker had been able to gain access so easily.
“To upload and alter video content with code you should require an authorisation token,” he said.
“So, either this hacker has found a way around that need for authorisation, or they are being economical with the facts, or they obtained the permissions in some other way.”