NodeJS/swiper/7.0.0-alpha.6


Most modern mobile touch slider and framework with hardware accelerated transitions

https://www.npmjs.com/package/swiper
MIT

1 Security Vulnerabilities

Prototype pollution in swiper

Published date: 2026-02-19T20:28:35Z
CVE: CVE-2026-27212
Links:

Summary

A prototype pollution vulnerability exists in the the npm package swiper (>=6.5.1, < 12.1.2). Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using Array.prototype. The exploit works across Windows and Linux and on Node and Bun runtimes. This issue is fixed in version 12.1.2

Details

The vulnerability resides in line 94 of shared/utils.mjs where indexOf() function is used to check whether user provided input contain forbidden strings.

PoC

Steps to reproduce

  1. Install latest version of swiper using npm install
  2. Run the following code snippet: javascript var swiper = require('swiper'); Array.prototype.indexOf = () => -1; let obj = {}; var malicious_payload = '{"__proto__":{"polluted":"yes"}}'; console.log({}.polluted); swiper.default.extendDefaults(JSON.parse(malicious_payload)); console.log({}.polluted); // prints yes -> indicating that the patch was bypassed and prototype pollution occurred

Expected behavior

Prototype pollution should be prevented and {} should not gain new properties. This should be printed on the console: undefined undefined OR throw an Error

Actual behavior

Object.prototype is polluted This is printed on the console: undefined yes

Impact

This is a prototype pollution vulnerability, which can have severe security implications depending on how swiper is used by downstream applications. Any application that processes attacker-controlled input using this package may be affected. It could potentially lead to the following problems: 1. Authentication bypass 2. Denial of service - Even if an attacker is not able to exploit prototype pollution in swiper, if there is a prototype pollution within the project from other dependencies, modifying global Array.prototype.indexOf property can result in crash when swiper.default.extendDefaults is called because swiper makes use of this global property. This can lead to Denial of Service.
3. Remote code execution (if polluted property is passed to sinks like eval or child_process)

Related CVEs

CVE-2026-25521 CVE-2026-25047 CVE-2026-26021

Affected versions: ["12.1.1", "12.1.0", "12.0.3", "12.0.2", "12.0.1", "12.0.0", "11.2.10", "11.2.9", "11.2.8", "11.2.7", "11.2.6", "11.2.5", "11.2.4", "11.2.3", "11.2.2", "11.2.1", "11.2.0", "11.1.15", "11.1.14", "11.1.12", "11.1.11", "11.1.10", "11.1.9", "11.1.8", "11.1.7", "11.1.6", "11.1.5", "11.1.4", "11.1.3", "11.1.2", "11.1.1", "11.1.0", "11.0.7", "11.0.6", "11.0.5", "11.0.4", "11.0.3", "11.0.2", "11.0.1", "11.0.0", "11.0.0-beta.3", "11.0.0-beta.2", "11.0.0-beta.1", "10.3.1", "10.3.0", "10.2.0", "10.1.0", "10.0.4", "10.0.3", "10.0.2", "10.0.1", "10.0.0", "10.0.0-beta.6", "10.0.0-beta.5", "10.0.0-beta.4", "10.0.0-beta.3", "10.0.0-beta.2", "10.0.0-beta.1", "9.4.1", "9.4.0", "9.3.2", "9.3.1", "9.3.0", "9.3.0-beta.1", "9.2.4", "9.2.3", "9.2.2", "9.2.1", "9.2.0", "9.1.1", "9.1.0", "9.0.5", "9.0.4", "9.0.3", "9.0.2", "9.0.1", "9.0.0", "9.0.0-beta.42", "9.0.0-beta.41", "9.0.0-beta.40", "9.0.0-beta.38", "9.0.0-beta.36", "9.0.0-beta.35", "9.0.0-beta.34", "9.0.0-beta.33", "9.0.0-beta.32", "9.0.0-beta.31", "9.0.0-beta.30", "9.0.0-beta.29", "9.0.0-beta.28", "9.0.0-beta.26", "9.0.0-beta.25", "9.0.0-beta.24", "9.0.0-beta.23", "9.0.0-beta.22", "9.0.0-beta.21", "9.0.0-beta.20", "9.0.0-beta.19", "9.0.0-beta.18", "9.0.0-beta.17", "9.0.0-beta.16", "9.0.0-beta.11", "9.0.0-beta.10", "9.0.0-beta.9", "9.0.0-beta.8", "9.0.0-beta.7", "9.0.0-beta.6", "9.0.0-beta.5", "9.0.0-beta.4", "9.0.0-beta.3", "9.0.0-beta.2", "9.0.0-beta.1", "8.4.7", "8.4.6", "8.4.5", "8.4.4", "8.4.3", "8.4.2", "8.4.1", "8.4.0", "8.3.2", "8.3.1", "8.3.0", "8.2.6", "8.2.5", "8.2.4", "8.2.3", "8.2.2", "8.2.1", "8.2.0", "8.1.6", "8.1.5", "8.1.4", "8.1.3", "8.1.2", "8.1.1", "8.1.0", "8.0.7", "8.0.6", "8.0.5", "8.0.4", "8.0.3", "8.0.2", "8.0.1", "8.0.0", "7.4.1", "7.4.0", "7.3.4", "7.3.3", "7.3.2", "7.3.1", "7.3.0", "7.2.0", "7.1.0", "7.0.9", "7.0.8", "7.0.7", "7.0.6", "7.0.5", "7.0.4", "7.0.3", "7.0.2", "7.0.1", "7.0.0", "7.0.0-alpha.40", "7.0.0-alpha.39", "7.0.0-alpha.38", "7.0.0-alpha.37", "7.0.0-alpha.36", "7.0.0-alpha.35", "7.0.0-alpha.34", "7.0.0-alpha.33", "7.0.0-alpha.32", "7.0.0-alpha.31", "7.0.0-alpha.30", "7.0.0-alpha.29", "7.0.0-alpha.28", "7.0.0-alpha.27", "7.0.0-alpha.26", "7.0.0-alpha.25", "7.0.0-alpha.24", "7.0.0-alpha.23", "7.0.0-alpha.22", "7.0.0-alpha.21", "7.0.0-alpha.20", "7.0.0-alpha.19", "7.0.0-alpha.18", "7.0.0-alpha.17", "7.0.0-alpha.16", "7.0.0-alpha.15", "7.0.0-alpha.14", "7.0.0-alpha.12", "7.0.0-alpha.11", "7.0.0-alpha.10", "7.0.0-alpha.9", "7.0.0-alpha.8", "7.0.0-alpha.7", "7.0.0-alpha.6", "7.0.0-alpha.5", "7.0.0-alpha.4", "7.0.0-alpha.3", "7.0.0-alpha.2", "7.0.0-alpha.1", "6.8.4", "6.8.3", "6.8.2", "6.8.1", "6.8.0", "6.8.0-beta.1", "6.7.5", "6.7.1", "6.7.0", "6.6.2", "6.6.1", "6.6.0", "6.5.9", "6.5.8", "6.5.7", "6.5.6", "6.5.5", "6.5.5-beta.1", "6.5.4", "6.5.3", "6.5.2", "6.5.1"]
Secure versions: [12.1.2, 12.1.3]
Recommendation: Update to version 12.1.3.

353 Other Versions

Version License Security Released
12.1.3 MIT 2026-03-24 - 17:46 13 days
12.1.2 MIT 2026-02-18 - 18:28 about 2 months
12.1.1 MIT 1 2026-02-13 - 21:13 about 2 months
12.1.0 MIT 1 2026-01-28 - 20:00 2 months
12.0.3 MIT 1 2025-10-21 - 15:18 6 months
12.0.2 MIT 1 2025-09-18 - 16:03 7 months
12.0.1 MIT 1 2025-09-11 - 20:30 7 months
12.0.0 MIT 1 2025-09-11 - 20:07 7 months
11.2.10 MIT 1 2025-06-28 - 15:06 9 months
11.2.9 MIT 1 2025-06-27 - 18:08 9 months
11.2.8 MIT 1 2025-05-23 - 16:11 11 months
11.2.7 MIT 1 2025-05-19 - 22:47 11 months
11.2.6 MIT 1 2025-03-19 - 17:43 about 1 year
11.2.5 MIT 1 2025-03-04 - 00:22 about 1 year
11.2.4 MIT 1 2025-02-14 - 20:18 about 1 year
11.2.3 MIT 1 2025-02-12 - 14:00 about 1 year
11.2.2 MIT 1 2025-01-31 - 15:45 about 1 year
11.2.1 MIT 1 2025-01-10 - 17:08 about 1 year
11.2.0 MIT 1 2025-01-02 - 19:16 over 1 year
11.1.15 MIT 1 2024-11-18 - 19:57 over 1 year
11.1.14 MIT 1 2024-09-12 - 21:40 over 1 year
11.1.12 MIT 1 2024-09-01 - 14:22 over 1 year
11.1.11 MIT 1 2024-08-28 - 13:40 over 1 year
11.1.10 MIT 1 2024-08-21 - 09:44 over 1 year
11.1.9 MIT 1 2024-07-31 - 11:21 over 1 year
11.1.8 MIT 1 2024-07-26 - 13:19 over 1 year
11.1.7 MIT 1 2024-07-24 - 06:48 over 1 year
11.1.6 MIT 1 2024-07-23 - 16:00 over 1 year
11.1.5 MIT 1 2024-07-15 - 10:46 over 1 year
11.1.4 MIT 1 2024-05-30 - 09:56 almost 2 years
11.1.3 MIT 1 2024-05-13 - 16:49 almost 2 years
11.1.2 MIT 1 2024-05-13 - 08:52 almost 2 years
11.1.1 MIT 1 2024-04-09 - 14:31 almost 2 years
11.1.0 MIT 1 2024-03-28 - 12:24 about 2 years
11.0.7 MIT 1 2024-02-27 - 11:34 about 2 years
11.0.6 MIT 1 2024-02-05 - 10:10 about 2 years
11.0.5 MIT 1 2023-11-22 - 12:52 over 2 years
11.0.4 MIT 1 2023-11-09 - 09:51 over 2 years
11.0.3 MIT 1 2023-10-26 - 10:56 over 2 years
11.0.2 MIT 1 2023-10-25 - 08:33 over 2 years
11.0.1 MIT 1 2023-10-24 - 15:22 over 2 years
11.0.0 MIT 1 2023-10-24 - 12:13 over 2 years
11.0.0-beta.3 MIT 1 2023-10-24 - 08:58 over 2 years
11.0.0-beta.2 MIT 1 2023-10-23 - 12:31 over 2 years
11.0.0-beta.1 MIT 1 2023-09-20 - 10:27 over 2 years
10.3.1 MIT 1 2023-09-28 - 08:14 over 2 years
10.3.0 MIT 1 2023-09-21 - 10:13 over 2 years
10.2.0 MIT 1 2023-08-17 - 09:17 over 2 years
10.1.0 MIT 1 2023-08-01 - 06:54 over 2 years
10.0.4 MIT 1 2023-07-08 - 08:12 over 2 years