CVE-2026-3884
Received Received - Intake
Prototype Pollution Enables XSS in spin.js Before

Publication date: 2026-03-11

Last updated on: 2026-03-11

Assigner: Snyk

Description
Versions of the package spin.js before 3.0.0 are vulnerable to Cross-site Scripting (XSS) via the spin() function that allows a creation of more than 1 alert for each 'target' element. An attacker would need to set an arbitrary key-value pair on Object.prototype through a crafted URL achieving a prototype pollution first, before being able to execute arbitrary JavaScript in the context of the user's browser.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-11
Last Modified
2026-03-11
Generated
2026-05-07
AI Q&A
2026-03-11
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
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
CWE Icon
KEV
KEV Icon
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 &lt; and &gt;), enforcing Content Security Policies (CSP), disabling unnecessary client-side scripts, redirecting invalid requests, and detecting and invalidating suspicious sessions.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart