Skip to content
Surf Wiki
Save to docs
linguistics

From Surf Wiki (app.surf) — the open knowledge base

Caja project

Google project for sanitizing third party HTML, CSS and JavaScript


Summary

Google project for sanitizing third party HTML, CSS and JavaScript

Caja (pronounced ) was a Google project for sanitizing third party HTML, CSS, and JavaScript. On January 31, 2021, Google archived the project due to known vulnerabilities and lack of maintenance to keep up with the latest web security research, recommending instead the Closure toolkit.

The Caja project was led by Jasvir Nagra with the JavaScript portion designed by Google research scientist Mark S. Miller in 2008 as a JavaScript implementation for "virtual iframes" based on the principles of object-capabilities. It would take JavaScript (technically, ECMAScript 5 strict mode code), HTML, and CSS input and rewrite it into a safe subset of HTML and CSS, plus a single JavaScript function with no free variables. That means the only way such a function could modify an object, was if it was given a reference to the object by the host page. Instead of giving direct references to DOM objects, the host page typically gives references to wrappers that sanitize HTML, proxy URLs, and prevent redirecting the page; this allowed Caja to prevent certain phishing and cross-site scripting attacks, and prevent downloading malware. Also, since all rewritten programs ran in the same frame, the host page could allow one program to export an object reference to another program; then inter-frame communication was simply method invocation.

The word "caja" is Spanish for "box" or "safe" (as in a bank), the idea being that Caja could safely contain JavaScript programs as well as being a capabilities-based JavaScript.

Caja was used by Google in its Google Apps Script products. In 2008 MySpace and Yahoo! had both deployed a very early version of Caja.

References

References

  1. (10 October 2007). "[e-lang] [cap-talk] Caja discussion on the Caplet Group".
  2. "Introduction - Caja".
  3. (7 June 2008). "Safe active content in sanitized JavaScript".
  4. (25 February 2011). "ECMAScript 5, Caja and Retrofitting Security, with Mark S. Miller".
  5. "Html Service: Caja Sanitization".
  6. (4 February 2008). "MySpace: Caja JavaScript scrubbing ready for prime time".
  7. (11 April 2008). "Web 2.0 Investors: Pay Attention To Caja".
  8. (28 October 2008). "OpenSocial API Blog: Launched: Yahoo!'s First Implementation of OpenSocial Support". [[OpenSocial]].
Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Caja project — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report