Categories
Security Web

Shipped to win: how the browser wars broke web security

A race with no time for security

In my last article I argued that the web took a wrong turn when browsers began to execute code. A fair follow-up question is: could it have been done differently in 1995?

I think the honest answer is that most of the technical fixes were known or at least imaginable. Scripts without inline code, permissions instead of ambient authority, an origin-based model from day one. What stopped them was not ignorance. It was a market.

Between 1995 and 2001 two companies fought for control of the browser, and in a fight like that, every decision is judged by one question: does it win developers and users right now? Security rarely does. It costs time, it breaks existing pages, and nobody notices it until something goes wrong.

My thesis is that the decisions which shaped web security were, to a large extent, not technical decisions at all. They were corporate-strategy decisions, made to gain market share or to hurt a competitor, and they were later dressed up with technical arguments. This article looks at five of them. For each one I want to ask what was decided, whose interest it served, and what we are still paying for today.

In those days I built a lot of websites, ranging from portals and professional company websites to my personal homepage and diary (which actually was one of the first blogs, even before the term “blog” existed). I preferred using Mosaic and then the Netscape browser and honestly never considered Internet Explorer. There was a simple reason for that: I built my websites on a Linux machine and always needed to ask friends to check if it worked in IE too. And of course, like all the others I put a “best viewed in Netscape” badge on the bottom of every page.

The race

Netscape Navigator started with a commanding lead, with some accounts putting its share at more than 90 percent when Internet Explorer appeared. Microsoft had a different weapon. It could bundle its browser with Windows, and it gave Internet Explorer away for free. Netscape, by contrast, charged for its Browser until early 1998.

The result was a first browser war that ended with Internet Explorer at a peak of more than 90 percent usage share around 2002. But the decisions I want to discuss were not made at the end. They were made in the middle of the race, between roughly 1995 and 1998, when both sides were releasing new versions every few months and the winner was not yet known.

In that situation the rules are simple. A feature the competitor has, you need within the next release. A feature the competitor lacks, you build to lock developers in. A site that breaks in your browser is your problem, not the site’s. And a specification is a luxury, because it takes longer than the next release. Remember the totally useless <blink> and <marquee> tags that Netscape and Microsoft invented just to have a fancy new feature.

Every decision below follows from those rules.

Decision 1: ship first, specify later

JavaScript itself is the first example. A working prototype existed within weeks, and it went into the browser while Netscape was closing its deal with Sun. In the fall of 1996, Brendan Eich rewrote most of it to pay off the technical debt that came from rushing it out of the door.

Then Microsoft answered. In 1996, Internet Explorer 3 shipped JScript, a reverse-engineered implementation of the same language, with its own differences and with access to Windows’ ActiveX objects. Two implementations that behaved differently meant developers had to test everything twice, which is where the “best viewed in Netscape” and “best viewed in Internet Explorer” badges came from.

The standardisation came afterwards, as damage control. Netscape submitted the language to Ecma in November 1996, and the first ECMAScript specification followed in June 1997. Microsoft then announced that JScript 3.0 was the first language to conform to the new standard.

The security consequence is easy to miss. A specification is also a review. It is the moment when someone asks what a feature should be allowed to do, and what happens if it is misused. Because the implementations came first, that review happened after thousands of pages already depended on the behaviour. Anything the standard wanted to forbid had to be weighed against breaking those pages.

Decision 2: the security model arrives after the code

The same-origin policy, the rule that one site’s script may not read another site’s content, was not designed together with JavaScript. It was added once the first holes appeared, and the early years were full of them: pages in one frame reading data from another. Microsoft’s engineers eventually gave the problem a name, cross-site scripting, in January 2000.

Why was the model not there from the start? The technical answer is that nobody knew what the threats would be. I think the political answer is more honest. Nobody gains market share from a security model for a threat that does not exist yet. A script that can do more than the competitor’s script is a feature in a demo. A script that is restricted is a limitation in a demo. Security only becomes visible when it fails, and at that point it is already deployed.

There is also a revealing difference in what each side chose to secure. Both vendors talked a great deal about trust, but the mechanisms they built were mostly about who a piece of code came from, not about what it was allowed to do. Microsoft’s ActiveX relied on signed code: if you trusted the publisher, the control ran with your full rights. Internet Explorer later added security zones, which gave pages from an intranet more privileges than pages from the internet. That is an enterprise sales argument as much as a security design, because corporate customers wanted their internal applications to just work. I must admit that the first thing I always did when opening Internet Explorer settings was to move the slider to the lowest security level for the internet zone.

Both approaches share the same flaw. They decide trust once, at load time, and then give the code everything. A capability model, where code receives only what it is handed, would have been the technically sound alternative. It also would have been much harder to explain in a press release.

Decision 3: features as weapons

When Bill Gates announced ActiveX in March 1996, the point was not to improve the web. Microsoft believed that ActiveX together with Internet Explorer 3 could capture developer attention and route millions of users from Netscape to Internet Explorer. The technology was a way of binding the web to Windows.

The same logic ran through JScript. Unlike Netscape’s version, it could create ActiveX objects, so a script in a web page could open an Excel sheet on the visitor’s machine. For a corporate developer on Windows that was wonderful. For anyone thinking about trust boundaries it was a disaster, because a web page was now one function call away from the operating system.

For a vendor that wants developers to build for one browser only, this is the ideal feature. It works nowhere else, it is hard to leave, and it is easy to demonstrate. It is also the opposite of what a security architect would ask for.

The most consequential example was a small one. XMLHttpRequest came out of the Exchange 2000 work on Outlook Web Access, and shipped as an ActiveX object with Internet Explorer 5 in March 1999. It was not designed as a web standard. It simply let a page talk to the server in the background, and that is the capability on which every single-page application is built. Internet Explorer did not support cross-origin requests the way the standard later defined them until version 10, long after the rest of the web had moved on. Until Internet Explorer 7 in 2006, the object was reachable only through ActiveX.

None of this was malicious. But it shows how the capabilities that define today’s attack surface entered the web: as side effects of a company’s product strategy, not as the result of a design process that asked what was really needed and what could go wrong.

There is one more consequence of this period that deserves its own discussion: in 1997, both vendors’ Dynamic HTML turned the document model into a user interface toolkit, and nobody ever went back to ask whether a text format was the right foundation for that. I look at that question in a separate article, The T in HTML: why a text format became an application platform

Decisions 4 and 5: forgiveness and ambient authority

Be liberal in what you accept. Browsers rendered whatever they were given, however broken. From a product point of view this was obviously right. If a page displays correctly in one browser and shows an error in the other, users blame the browser with the error. Tolerance was a competitive feature, and each vendor guessed in its own way what a broken page was supposed to mean.

For security this was expensive. When the software that checks a piece of HTML (a sanitiser, a filter, a firewall) interprets malformed markup differently from the browser that finally renders it, an attacker can write input that passes the check and still becomes a script. Content sniffing worked the same way: a browser that decides a file is HTML despite what the server says turns a harmless upload into an attack. It took the later HTML standardisation work to define exactly how every error must be handled, so that all browsers would interpret the same broken page in the same way.

Attach the cookie to every request. Cookies, introduced by Netscape in the mid-1990s, are sent to a site with every request to that site, regardless of which page triggered it. That is convenient for logins, and it is exactly the ambient authority I described in the previous article. It is also the root of cross-site request forgery: the attacker’s page makes your browser send a request, and your browser helpfully adds your credentials.

The fix is simple to state. Cookies should be sent only when the request comes from the same site. It took until February 2020 for Chrome to begin treating cookies without a declared SameSite value as SameSite=Lax, and the enforcement was rolled back in April 2020 and resumed later that year. Other browsers had already restricted third-party cookies in various ways. The usual explanation for the delay is economic. Third-party cookies carried the advertising and tracking industry, so changing the default meant breaking a lot of companies’ business models. Whatever the exact weighting, a security fix waited for years on a commercial question.

Why nobody could fix it alone

Once the habits were set, they were nearly impossible to change, and the reason is again strategic rather than technical. Imagine you are a browser vendor in 2003 and you decide to ban inline scripts, because you know it would eliminate a whole class of attacks. Half of the existing sites stop working in your browser, and work perfectly in your competitor’s. Your users do not thank you for the security improvement. They switch.

This is a prisoner’s dilemma. Every vendor would be better off if all of them tightened the rules together, and each vendor is worse off if it tightens them alone. The result is the principle that browsers must not break existing pages, which has protected the web’s compatibility and its insecurity in equal measure.

The interesting part is what finally moved things. For a few years nothing did. After the first war ended, Internet Explorer’s share reached more than 90 percent, and Microsoft paid it little attention once Netscape was gone. What changed this was competition coming back. Serious vulnerabilities in Internet Explorer in 2004 sent many users looking for an alternative, and Firefox grew from about 2 percent that year to 17 percent by early 2008. Google launched Chrome on 1 September 2008.

From that point security became something a browser could advertise. Process isolation, sandboxing, fast automatic updates and, later, site isolation were features that vendors competed on. The irony is that the same market mechanism that had pushed security aside in 1996 began to reward it, once enough users knew what a drive-by attack was.

That is the lesson I find most uncomfortable. Security improved when it became a competitive advantage, not when it became obviously the right thing to do.

What this teaches us today

I do not want to end with nostalgia or with blame. The people who made these decisions were doing what the situation rewarded. The lesson is about situations.

Whenever a new capability is rolled out in a race, the same pattern appears. The capability ships before its security model exists. The model is added later, under pressure not to break what already works. And the people who pay for the gap are not the ones who created it.

That description fits the current wave of AI agents rather well. Agents that read mail, call tools and act on a user’s behalf are being shipped by vendors who compete on who offers the most capabilities first. Prompt injection is the same old mistake in a new place: instructions and data share one channel, and the system cannot tell them apart. I wrote about this in my article on security in AI development, and I would not be surprised if a future version of this article had a paragraph about agents in its second half.

What can we do about it, as engineers and as leaders?

  1. Ask whose interest a technical argument serves. If the justification for a design decision appeared after the decision was made, treat it with suspicion.
  2. Build the security model together with the feature. Retrofitting is always more expensive, and it never finishes.
  3. Make the safe default the competitive one. Where we choose platforms and vendors, security behaviour should be part of the decision, not an afterthought.
  4. Accept some loss of compatibility early. Every year of waiting makes the cut deeper.

The browser wars ended a quarter of a century ago. The incentives that drove them have not.

Sometimes I feel a deep desire to redesign the web from the ground up. A web for sharing information and a separate web for running applications, without all the fancy stuff and kept as simple as possible.

Part 1: What went wrong with the Web

Part 3: The T in HTML: why a text format became an application platform

Sources

By marcus

Experienced technology leader and software architect with more than 30 years of experience in software delivery, architecture and leadership. Focus on technical strategy, sustainable architectures and team leadership.

One reply on “Shipped to win: how the browser wars broke web security”