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.

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.

Advertisement. Scroll to continue reading.

Related: Google Launches Game to Teach XSS Bug Discovery Skills

Related: Mozilla Launches Website Security Testing Tool

Written By

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

Click to comment

Trending

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.

Learn how the LOtL threat landscape has evolved, why traditional endpoint hardening methods fall short, and how adaptive, user-aware approaches can reduce risk.

Watch Now

Join the summit to explore critical threats to public cloud infrastructure, APIs, and identity systems through discussions, case studies, and insights into emerging technologies like AI and LLMs.

Register

People on the Move

Cloud security startup Upwind has appointed Rinki Sethi as Chief Security Officer.

SAP security firm SecurityBridge announced the appointment of Roman Schubiger as the company’s new CRO.

Cybersecurity training and simulations provider SimSpace has appointed Peter Lee as Chief Executive Officer.

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.