Domain hijacks don't happen via web application hacks, but are usually via vulnerabilities in the domain registrar's system, or by managing to intercept/take over the email accounts the domains are registered to - so the attacker can reset the passwords and intercept the transfer emails, agreeing to the transfer.
Normally it'll happen by managing to convince the domain registrar that the attacker is the owner of the domain, using personal information about the domain owner to access their account on the registrar and then either switch the DNS servers to an attacker's DNS servers from where they can redirect how they like, or by transferring the domain to the attacker.
Or of course there's simply waiting for the domain to expire and grabbing it before it's renewed.
ICANN produced a report in 2005 about this issue, covering the risks and actions you can take.