CVE-2026-3884
Prototype Pollution Enables XSS in spin.js Before
Publication date: 2026-03-11
Last updated on: 2026-03-11
Assigner: Snyk
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| spin.js | spin.js | to 3.0.0 (exc) |
| spin.js | spin.js | From 1.3.1 (inc) to 2.3.2 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2026-3884 is a Cross-site Scripting (XSS) vulnerability in spin.js versions before 3.0.0. It arises from the spin() function, which can create multiple alert dialogs for each 'target' element. An attacker must first perform prototype pollution by setting arbitrary key-value pairs on Object.prototype through a crafted URL. This prototype pollution then enables the attacker to execute arbitrary JavaScript in the user's browser context."}, {'type': 'paragraph', 'content': 'The vulnerability occurs because the application fails to properly escape or sanitize user input, allowing malicious scripts to be injected and executed. Spin.js is a JavaScript library used as a spinning activity indicator in web applications.'}] [1, 2]
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': "This vulnerability can lead to several security issues including session hijacking, theft of cookies, exposure of sensitive information, unauthorized access to privileged services, and delivery of malware. Because it allows execution of arbitrary JavaScript in the user's browser, attackers can manipulate the web application behavior or steal user data."}, {'type': 'paragraph', 'content': 'The attack requires no special privileges but does require active user interaction, such as visiting a crafted URL.'}] [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection of this vulnerability involves identifying if your system is using spin.js versions prior to 3.0.0, which are vulnerable to prototype pollution leading to XSS.
One practical approach is to check the version of spin.js used in your web applications by inspecting the package.json file or the loaded JavaScript files in the browser developer tools.
Additionally, you can test for the vulnerability by attempting to exploit prototype pollution via crafted URLs that set arbitrary key-value pairs on Object.prototype, then observing if multiple alert dialogs are triggered when the spin() function is called.
For example, you might use browser developer tools console commands or automated scripts to check if Object.prototype has been polluted, such as:
- Inspect Object.prototype for unexpected properties: `console.log(Object.prototype)`
- Check if multiple alert dialogs appear when spin.js spin() function is invoked on target elements.
However, no specific detection commands are provided in the available resources.
What immediate steps should I take to mitigate this vulnerability?
The primary and most effective mitigation step is to upgrade spin.js to version 3.0.0 or later, where the vulnerability has been fixed.
Additional general XSS prevention measures include sanitizing and validating all user inputs, escaping special characters (such as converting < and > to < and >), enforcing Content Security Policies (CSP), disabling unnecessary client-side scripts, redirecting invalid requests, and detecting and invalidating suspicious sessions.