xviii Preface
and implementation shortcomings of the World Wide Web are those of a
technology that never aspired to its current status and never had a chance
to pause and look back at previous mistakes. The resulting issues have quickly
emerged as some of the most significant and prevalent threats to data secu-
rity today: As it turns out, the protocol design standards one would apply to
a black-on-gray home page full of dancing hamsters are not necessarily the
same for an online shop that processes millions of credit card transactions
every year.
When taking a look at the past decade, it is difficult not to be slightly
disappointed: Nearly every single noteworthy online application devised so
far has had to pay a price for the corners cut in the early days of the Web.
Heck, xssed.com, a site dedicated to tracking a narrow subset of web-related
security glitches, amassed some 50,000 entries in about three years of opera-
tion. Yet, browser vendors are largely unfazed, and the security community
itself has offered little insight or advice on how to cope with the widespread
misery. Instead, many security experts stick to building byzantine vulnerabil-
ity taxonomies and engage in habitual but vague hand wringing about the
supposed causes of this mess.
Part of the problem is that said experts have long been dismissive of the
whole web security ruckus, unable to understand what it was all about. They
have been quick to label web security flaws as trivial manifestations of the
confused deputy problem
*
or of some other catchy label outlined in a trade jour-
nal three decades ago. And why should they care about web security, anyway?
What is the impact of an obscene comment injected onto a dull pet-themed
home page compared to the gravity of a traditional system-compromise flaw?
In retrospect, I’m pretty sure most of us are biting our tongues. Not only
has the Web turned out to matter a lot more than originally expected, but
we’ve failed to pay attention to some fundamental characteristics that put
it well outside our comfort zone. After all, even the best-designed and most
thoroughly audited web applications have far more issues, far more frequently,
than their nonweb counterparts.
We all messed up, and it is time to repent. In the interest of repentance,
The Tangled Web tries to take a small step toward much-needed normalcy, and
as such, it may be the first publication to provide a systematic and thorough
analysis of the current state of affairs in the world of web application security.
In the process of doing so, it aims to shed light on the uniqueness of the secu-
rity challenges that we—security engineers, web developers, and users—have
to face every day.
The layout of this book is centered on exploring some of the most prom-
inent, high-level browser building blocks and various security-relevant topics
derived from this narrative. I have taken this approach because it seems to be
more informative and intuitive than simply enumerating the issues using an
*
Confused deputy problem is a generic concept in information security used to refer to a broad
class of design or implementation flaws. The term describes any vector that allows the attacker
to trick a program into misusing some “authority” (access privileges) to manipulate a resource
in an unintended manner—presumably one that is beneficial to the attacker, however that
benefit is defined. The phrase “confused deputy” is regularly invoked by security researchers
in academia, but since virtually all real-world security problems could be placed in this bucket
when considered at some level of abstraction, this term is nearly meaningless.