Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Application Security

Google Releases New XSS Prevention Tools

Google has released new tools and documentation designed to help developers mitigate cross-site scripting (XSS) attacks using the Content Security Policy (CSP) standard.

Google has released new tools and documentation designed to help developers mitigate cross-site scripting (XSS) attacks using the Content Security Policy (CSP) standard.

XSS vulnerabilities continue to affect numerous web applications, even ones developed by major companies. In the past two years, Google awarded researchers more than $1.2 million for these types of flaws.

One potentially efficient solution for mitigating XSS attacks is CSP, a mechanism that allows developers to restrict which scripts can be executed. If policies are configured properly, attackers are not able to load malicious scripts and other resources, even if they manage to inject HTML code into a webpage.

However, CSP policies fail to provide proper XSS protection if they are not configured properly. A study conducted recently by Google researchers on more than 1 billion domains showed that CSP policies can be bypassed in a vast majority of cases.

Google wants to help developers and security experts determine if a CSP is efficient against XSS attacks by releasing a tool called CSP Evaluator. The online tool, also available as a Chrome extension, helps identify subtle CSP misconfigurations that could be exploited by attackers.

While such a tool can be very helpful, Google pointed out that the large number of popular domains with resources that allow CSP to be bypassed makes it difficult to create a whitelist of safe scripts for complex applications. A better approach involves using a nonce-based CSP policy, where a nonce (i.e. an unpredictable token that can only be used once) is assigned to each trusted script.

Advertisement. Scroll to continue reading.

Google has used this approach for several of its applications, including Cloud Console, History, Photos, Maps Timeline, Careers Search and Cultural Institute. In order to help developers determine if an application is compatible with a nonce-based CSP, Google released a Chrome extension called CSP Mitigator. The search giant has also published documentation describing best strategies for implementing CSP.

Google has invited security experts to submit proposals on how to make popular open-source frameworks compatible with a nonce-based CSP. The initiative has been added to the company’s bug bounty program and submissions can qualify for a reward.

Related: Google Launches Game to Teach XSS Bug Discovery Skills

Related: Mozilla Launches Website Security Testing Tool

Written By

Eduard Kovacs (@EduardKovacs) is senior managing editor at SecurityWeek. He worked as a high school IT teacher before starting a career in journalism in 2011. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights.

Click to comment

You must be logged in to post a comment Login

Leave a Reply

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Close the security gaps between pentests. Join this session to explore agentic pentesting and gain a practical framework for continuous exposure validation in your CTEM program.

Register

Join as we bring together CISOs, senior cybersecurity executives, practitioners, industry experts, and other security leaders to share practical experience and examine the issues shaping enterprise cybersecurity strategy.

Register

People on the Move

Tal Kapulnik has been named CMO at Terra Security.

Cloudflare has appointed Christian Smith as President of Revenue.

Doran Stienike has become CIO at Presidio.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.