This article is more than 1 year old

GTFO of there! Security researchers turn against HTTP public key pinning

Sure, theoretically it offers a lot of protection, but get it wrong...

Security researchers have endorsed industry guru Scott Helme's vote of no confidence in a next-generation web crypto technology.

Helme said he was "giving up on HPKP" after experimenting with the tech and ultimately finding it too cumbersome for mainstream use even among security-conscious organisations.

HTTP Public Key Pinning (HPKP) is a very powerful standard that allows a host to instruct a browser to only accept certain public keys when communicating with it for a given period of time. While HPKP can offer a lot of protection, it can also cause a lot of harm too, according to Helme.

"The problem with HPKP is that it can be quite a complex idea to get your head around and requires a perfect deployment otherwise things can go wrong," Helme argues in a blog post.

Potential problems arising from use of the technology include a so-called RansomPKP attack. In this breach scenario an attacker would gain control of a targeted site via a server compromise or a domain hijack before enabling HPKP headers for malicious ends.

"When your visitors go to your site they pick up the malicious HPKP header set by the bad guys," Helme wrote. "At some point you then fix the problem and take back control of your site except now, none of the browsers will connect because of the HPKP policy they picked up from the bad guys."

Other issues for early HPKP adopters include HPKP Suicide, which arises after keys are accidentally deleted, stolen in a hack or otherwise lost. Sites that pin themselves to a set of keys and then no longer have the ability to use them are in big trouble, as Smashing Magazine discovered.

Helme's criticism of HPKP follows earlier doubts along the same lines from Qualys. Risks from failure modes outweigh the touted infosec benefits of HPKP.

Web developer Michal Špaček added: "I helped save a site from PKP suicide by finding some unused/forgotten/old CA root pinned and buying a cert from them."

Providing HPKP capability to unvetted web developers was, in retrospect, a mistake, according to a senior security developer at Google.

Ryan Sleevi of Google made the admission during a discussion on the topic on Twitter. "Pinning is terrible – and harms the ecosystem more than helps, as we've seen. It was a bad thing to standardise," he said.

Ivan Ristic of SSL Labs disagreed, in part. "The real mistake was the design, which assumes that mistakes won't happen and has no recovery mechanism."

He added:"HPKP could be saved, still, if the pins are made to break on certificate expiration/revocation. No catastrophic failures with that change."

Professor Alan Woodward, a computer scientist at the University of Surrey, told El Reg that the risk of ransoming is real but less of an issue than the other problems. The whole system of web revocation is broken and the potential pratfalls that come from deploying HPKP are just a case in point.

"Like many security headers there are mistakes being made in implementation but that alone wouldn't be enough to abandon HPKP," Woodward said. "However, when you combine all of the issues surrounding HPKP it definitely seems to be a mechanism that could cause more harm to good."

Helme told El Reg that although both GitHub and Tumblr have a "nice deployment" of the technology, he would advise against using the technology in all but a small subset of cases.

“The only sites that I'd really advocate use it are Gov/Banking, super high-value sites," Helme concluded. ®

More about

TIP US OFF

Send us news


Other stories you might like