Microsoft is considering adding public-key pinning–an important defense against man-in-the-middle attacks–to Internet Explorer.

The feature is designed to help protect users against the types of MITM attacks that rely on forged certificates, which comprise a large portion of those attacks. Attackers use forged or stolen certificates to trick victims’ browsers into trusting a malicious site that the attacker controls. Public-key pinning helps prevent those attacks by binding a set of public keys issued by a trusted certificate authority to a specific domain. With that defense in place, if the user visits the site and is presented with a key that’s not part of the pinned set, the browser will reject the secure connection.

Public-key pinning as an extension to HTTP is laid out in an Internet-Draft submitted to the IETF by a group of Google security engineers in October. The draft makes it clear that in order for the system to work, site operators must be up to the task.

“Deploying PKP safely will require operational and organizational maturity due to the risk that hosts may make themselves unavailable by pinning to a (set of) SPKI(s) that becomes invalid. With care, host operators can greatly reduce the risk of main-in-the-middle (MITM) attacks and other false-authentication problems for their users without incurring undue risk,” the specification says.

But in order for the system to work, browsers must support it, as well. Google Chrome already ships with public-key pinning support, and Mozilla Firefox 32, which debuted in September, also includes the feature. Now, Microsoft has public-key pinning under consideration for inclusion in Internet Explorer, too.

MITM attacks come in a variety of flavors, but one of the key components in many of them is the use of a forged certificate. In order to fool a user’s browser into trusting a site that the attacker controls, the attacker can present a stolen or forged certificate for the site, This happens fairly regularly, and the technique has come up in some high-profile attacks in the last few years. In 2011, an attacker compromised Dutch CA DigiNotar and issued himself valid certificates for a number of high-value domains, including those belonging to Google, Yahoo and Mozilla.

Earlier that same year, an attacker–who may have been the same one to compromise DigiNotar–penetrated Comodo, another CA, and pulled the same stunt, issuing certificates for Mozilla, Skype and Yahoo domains. The public-key pinning mechanism has the potential to defeat the attacks that result from these kind of CA compromises by locking in a known-good set of keys for a given domain.