CVE-2017-1000006: Cross Site Scripting (XSS) in plotly.js

plotly.js Updated 02 Oct 2025

Summary

24/10/2017
Yes i
Moderate
6.1

CVE-2017-1000006: Cross Site Scripting (XSS) in plotly.js. Affects plotly.js versions < 1.16.0. Fixed in 1.16.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

plotly.js is an open-source JavaScript graphing library that allows users to create interactive, publication-quality graphs. It is commonly used in web applications to visualize data. However, versions of plotly.js prior to 1.16.0 are vulnerable to cross-site scripting (XSS) attacks. This means that if an attacker can convince a user to visit a malicious plot on a site using this package, they can execute arbitrary code in the user's browser.

Vulnerability Detail

The vulnerability in plotly.js arises from insufficient input sanitization, allowing an attacker to inject malicious scripts into the generated plots. When a user interacts with the plot, the injected script will execute in the user's browser context, potentially leading to session hijacking, data theft, or other malicious activities. This vulnerability has a CVSS score of 6.1, indicating a moderate severity level.

How To Fix

Minimum fixed version

1.16.0

This is the first release that contains the fix.

npm install plotly.js@1.16.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating to the latest version of plotly.js is not feasible, a temporary workaround is to manually sanitize user input before passing it to the library. This can be done by using a trusted HTML sanitization library or by implementing custom input validation and sanitization logic. Here is an example of how to sanitize user input using the DOMPurify library:

const sanitizedInput = DOMPurify.sanitize(userInput);

Conclusion

In conclusion, plotly.js versions prior to 1.16.0 are vulnerable to cross-site scripting (XSS) attacks. To protect your application, it is crucial to update to the latest version of plotly.js or apply manual input sanitization. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for plotly.js →

Share this vulnerability

FAQ

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. These scripts can be used to steal sensitive information, manipulate user interactions, or perform other malicious actions.

An attacker can exploit this vulnerability by creating a malicious plot using plotly.js and convincing a user to visit a page containing the plot. When the user interacts with the plot, the injected script will execute in their browser, giving the attacker control over the user's session or allowing them to steal sensitive information.

The impact of this vulnerability can vary depending on the actions performed by the injected script. Possible consequences include session hijacking, data theft, unauthorized access to user accounts, and manipulation of user interactions.

Yes, this vulnerability has been fixed in plotly.js version 1.16.0. It is recommended to update to this version or later to ensure the security of your application.

The primary mitigation for this vulnerability is to update plotly.js to the latest version. Additionally, implementing input validation and sanitization measures can help mitigate the risk of XSS attacks in general.

How To Fix

Minimum fixed version

1.16.0

This is the first release that contains the fix.

npm install plotly.js@1.16.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback