Vulnerability DatabaseCVE-2016-1000228

CVE-2016-1000228
JavaScript vulnerability analysis and mitigation

Overview

The gmail-js library versions <= 0.6.4 contain a DOM-based Cross-Site Scripting (XSS) vulnerability. The issue exists in the tools.parse_response, helper.get.visible_emails_post, and helper.get.email_data_post functions, which pass user input directly into the Function constructor, allowing potential execution of malicious code (GitHub Advisory).

Technical details

The vulnerability stems from the library dynamically creating functions out of response data and executing them. Three specific instances were identified where user input is passed directly to the Function constructor without proper sanitization: in api.tools.parse_response, api.helper.get.visible_emails_post, and api.helper.get.email_data_post functions. This implementation could allow an attacker to inject and execute arbitrary JavaScript code (GitHub Issue).

Impact

The vulnerability allows attackers to execute arbitrary JavaScript code in the context of the web application using the gmail-js library. This could lead to theft of sensitive information, session hijacking, or other malicious actions performed in the user's browser context (GitHub Advisory).

Exploitability

The vulnerability can be exploited when malicious data is passed through the affected functions. For example, if data containing JavaScript code like 'alert(1);' is passed to these functions, it would be executed in the context of the web application (GitHub Issue).

Mitigation and workarounds

The vulnerability has been patched in version 0.6.5 of gmail-js. The fix involves replacing the use of new Function() with JSON.parse() for safer data handling. Users should update to version 0.6.5 or later to mitigate this vulnerability (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48170CRITICAL9.1
  • JavaScript logoJavaScript
  • scim-patch
NoYesAug 07, 2026
CVE-2026-48007HIGH8.6
  • JavaScript logoJavaScript
  • @element-hq/element-call-embedded
NoYesAug 07, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • kibana-9.2
NoYesAug 07, 2026
CVE-2026-71850MEDIUM4.8
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026
CVE-2026-71849LOW3.7
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management