Skip to content

fix(deps): update dependency swiper to v12 [security] - #560

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-swiper-vulnerability
Open

fix(deps): update dependency swiper to v12 [security]#560
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-swiper-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
swiper (source) ^9.1.0^12.1.2 age confidence

Prototype pollution in swiper

CVE-2026-27212 / GHSA-hmx5-qpq5-p643

More information

Details

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:
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

Severity

  • CVSS Score: 9.4 / 10 (Critical)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

nolimits4web/Swiper (swiper)

v12.1.2

Compare Source

v12.1.1

Compare Source

Bug Fixes

v12.1.0

Compare Source

Bug Fixes
  • autoplay: broken custom delay percentages with pause/resume (#​8133) (0afecde)
  • core: Don't use data-swiper-slide-index for realIndex when virtual module is enabled (#​8142) (bd957f8)
  • core: Escape all CSS selector special characters (d35f41a), closes #​8135
  • core: support slidesOffsetBefore and slidesOffsetAfert in cssMode (45b98d0), closes #​7926
  • fix lazy preloader removal error in react in vue (332f5c7), closes #​8149
  • thumbs: update slide classes on virtual swiper update (#​8141) (9752771)
  • types: Add autoScroll to thumbs.update type signature (#​8146) (5d91e6e)
  • zoom: initialize gesture state after programmatic zoom (#​8112) (71e9511)
Features

v12.0.3

Compare Source

Bug Fixes
Features
  • core: add 'getRotateFix' export to effect utils (c97ae5d), closes #​8114

v12.0.2

Compare Source

Features

v12.0.1

Compare Source

Bug Fixes
  • navigation: tweak nav styles when adjacent (98440d9)

v12.0.0

Compare Source

Bug Fixes
Features
  • a11y: add wrapperLiveRegion param to disable wrapper live region in a11y module (#​8061) (d03044e)
  • move to SVG icons for navigation (264603c), closes #​6652 #​4990
  • remove LESS and SCSS styles in favor of CSS (118ec66)
  • virtual: add slidesPerViewAutoSlideSize parameter for fixed slide dimensions with slidesPerView auto (d472144), closes #​8041 #​7796

v11.2.10

Compare Source

Bug Fixes
  • core: fix clickedIndex with grid (863d8bd)

v11.2.9

Compare Source

Bug Fixes
  • core: clear blank slides within loopCreate() (#​8033) (377d53c)
  • core: escape brackets when transforming classes to selector (#​8014) (0c53ee8)
  • core: slideTo function does not work when grid.rows > 1 (#​8030) (1fde9d3)
  • core: using loop and slideToClickedSlide / slideToLoop with centeredSlides (b6692e2), closes #​8031
  • element: don't set subprops on boolean values (090caa1), closes #​8003
  • keyboard: detect contenteditable element in keyboard module (#​8006) (fcd434a)
  • vue: add missing event (839cafb), closes #​8002

v11.2.8

Compare Source

Bug Fixes

v11.2.7

Compare Source

Bug Fixes

v11.2.6

Compare Source

Bug Fixes
  • cards/loop: improve loop behavior with cards effect (9a258d4), closes #​7917
  • core: fix initialSlide in loop mode when it there are not enough slides to fill (16818e2), closes #​7780
  • core: fix touchReleaseOnEdges in RTL (d841428), closes #​7179

v11.2.5

Compare Source

Bug Fixes
Features

v11.2.4

Compare Source

Bug Fixes

v11.2.3

Compare Source

Bug Fixes
Features

v11.2.2

Compare Source

Bug Fixes

v11.2.1

Compare Source

Bug Fixes
  • core: fix clickedIndex with grid (863d8bd)

v11.2.0

Compare Source

Bug Fixes
Features

v11.1.15

Compare Source

Bug Fixes

v11.1.14

Compare Source

Bug Fixes

v11.1.12

Compare Source

Bug Fixes
Features

v11.1.11

Compare Source

Bug Fixes
  • centeredSlides with centeredSlidesBounds don't work correct when slidesPerView: 'auto' and width of the swiper-container bigger then width of slides (#​7696) (c11172a)
  • element: fix element styles to have correct order override (f26036f), closes #​7704
  • virtual: fix bypassing initial translate check if Virtual is enabled (df957bb), closes #​7699

v11.1.10

Compare Source

Bug Fixes
  • pagination: fixed swiper Infinite loop scroll jumping (#​7690)
  • zoom: fix zoomIn after currentScale is set to 1 (#​7663) (94173da)

v11.1.9

Compare Source

Bug Fixes
  • core: fix loop missing slides with centeredSlides (4847fcb), closes #​7584
  • core: fix types of swiper-effect-utils.d.ts (#​7655) (4875f26)
  • mousewheel: fix issue with event handling after Swiper was destroyed (82ae434), closes #​7654
Features
  • add types for minTranslate and maxTranslate functions (#​7647) (450c57a)

v11.1.8

Compare Source

Bug Fixes

v11.1.7

Compare Source

Bug Fixes

v11.1.6

Compare Source

Bug Fixes
Features
  • a11y: added new prop for a11y module - scrollOnFocus (#​7632) (f4f7da0)
  • element: added support for using slots as swiper wrappers (#​7624) (e374e06)

v11.1.5

Compare Source

Bug Fixes

v11.1.4

Compare Source

Bug Fixes
  • a11y: fix slide on focus when loop mode is enabled (fc8ed1a), closes #​7540
  • core: check for swiper.el in destroy queue (39a3e53), closes #​7530
  • navigation: prevent hide on click when clicking on navigation buttons (c0f7bb6), closes #​7559
  • vue: avoid rendering same slide vnode twice for small amount of slides in loop + virtual mode (#​7556) (5737f03)
  • zoom: fix issue when slide change possible during zoom out (f67308c)

v11.1.3

Compare Source

Bug Fixes

v11.1.2

Compare Source

Bug Fixes
  • autoplay: keep 0 transition on touchmove with 0 timeout delay (8ccb08e), closes #​7515
  • core: centerInsuffientSlides takes offsets into account (#​7437) (5a271ff)
  • types: fixed SwiperModule, slideTo, effectInit types (#​7428) (bc61bce)
Performance Improvements
  • do not remove and re-add visibility classes for unchanged slides to prevents unnecessary style recalculations (This performance difference is mostly noticable when moving a slide with a mouse or touchmove because updateSlidesProgress is triggered for every keyboard-/touchevent) (#​7505) (2c08227)

v11.1.1

Compare Source

Bug Fixes

v11.1.0

Compare Source

Bug Fixes

v11.0.7

Compare Source

Bug Fixes
  • core: fix initial slide index shift with centeredSlides and slidesPerView auto (#​7319) (cae9c2d)
  • history: fix setting history in virtual slides (d4de17b), closes #​7327
  • react: make sure the key is unique in virtual mode (829a253), closes #​7329
Features

v11.0.6

Compare Source

Bug Fixes
  • add optional swiperElementNodeName param to allow more flexible web component usage (#​7284) (178511f)
  • fixed behavior where the combination of 'initialSlide:0' and 'slidesPerView:auto' would shift the first slide position (e5c04c3), closes #​7216
  • Safari 3D fix for webview (d42ce05), closes #​7167
  • scrollbar: correctly update scrollbar on changeDirection (6bbb73d), closes #​7263
  • SwiperOptions documentation for loopAddBlankSlides (#​7289) (cbc3dba)
Features
  • core: prevent running .slideTo methods when Swiper is destroyed (05f9c64), closes #​7265

v11.0.5

Compare Source

Bug Fixes
Features
  • core: new slidesUpdated event (8a0c7c4)

v11.0.4

Compare Source

Bug Fixes
  • effectx: fix Safari issue with rotates even to 90deg (e005b69), closes #​7167

v11.0.3

Compare Source

Bug Fixes
  • core: fixed legacy condition preventing touch move when zoom enabled (2f64043), closes #​7137
  • core: prevent observer updates on loop fix (7a5eacc), closes #​7135

v11.0.2

Compare Source

Bug Fixes
  • core: correctly handle loopAdditionalSlides parameter (3f5e05d)

v11.0.1

Compare Source

Bug Fixes
  • types: fix eventsPrefix type (fd0f601)

v11.0.0

Compare Source

Bug Fixes
  • autoplay: fix negative autoplay values after stop/start, fix autoplay with free mode (8bef84d), closes #​7084
  • autoplay: fix pauseOnPointerEnter if hovered during transition (5080d95), closes #​7107
  • core: remove grid class on rows change (2f65e89), closes #​7053
  • element: correctly respond to object params assignment (f23c742)
  • scrollbar: allow multiple classes in scrollbar parameters (89a6f71), closes #​7096
Features
  • core: add fully visible slides classes (902a4c4), closes #​6773
  • core: add handling for native touch events (74bb1cc), closes #​6478 #​6381 #​6897
  • core: loop support for grid, new loopAddBlankSlides parameter (b5db223)
  • core: remove loopedSlides parameter, add loopAdditionalSlides parameter (d647985)
  • core: reworked loop mode (2a99dbd)
  • core: update loop mode logic and lowered requirements (703ede6)
  • element: makeeventPrefix parameter default to swiper (88d463a)
  • core: move default container overflow back to hidden (88941a8)

v10.3.1

Compare Source

Bug Fixes

v10.3.0

Compare Source

Bug Fixes
  • core: correctly destroyor create loop on breakpoints (12a44fb), closes #​6967
  • core: don't call realIndexChange on initialIndex if runCallbacksOnInit is disalbed (48c4e0a), closes #​6976
  • core: fix slideToClickedSlide when using Element slide slots (af0519c), closes #​6958
  • core: fix lazy preloader in later initialized slides (e4fddc0), closes #​6946
  • core: fix loop on centeredSlides slide to beginning (c496835), closes #​7011
  • core: fix loopFix in loop and cssMode (8180a52), closes #​6919
  • core: fixed ignored allowSlidePrev/Next in loop mode (1b74619), closes #​6987
  • core: remove grid class on rows change (908becc), closes #​7053
  • element: correctly respond to object params assignment (2ef1ff5)
  • element: do not bubble hashchange event (106a3d7), closes #​6943
  • element: fix issue updating with boolean module params (1cc359e), closes #​6947
  • navigation: fix lock class on enable (ea39c33), closes #​7009
  • react: add breakpointsBase param (0eb4122), closes #​7014
  • react: fix react components props type (1cd412e), closes #​7000
  • scrollbar: add 'touch-action: none' to swiper-scrollbar (#​7024) (9542d09)
  • virtual: fix issue with loop mode and initialSlide enabled (f4afd9d), closes #​6945
  • virtual: fix removing nested slides (c3321e1), closes #​7005
  • virtual: recalc cache on removeSlide (96e5166), closes #​7020
  • vue: add breakpointsBase param (6800dbb)
  • zoom: fix scale origin when document is scrolled (2cf3fc2), closes #​6950 #​6955
Features
  • core: allow createElements to process object params with {enabled: true} (abf8405)
  • core: make slidesPerViewDynamic public (ae434b0), closes #​7036

v10.2.0

Compare Source

Bug Fixes

Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 4 times, most recently from 17973a3 to 045bee7 Compare March 5, 2026 22:41
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 2 times, most recently from 1779ff7 to 52dcd52 Compare March 13, 2026 22:12
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 2 times, most recently from c017c98 to 431a8b9 Compare March 26, 2026 21:58
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v12 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-swiper-vulnerability branch March 27, 2026 01:20
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] - autoclosed fix(deps): update dependency swiper to v12 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 2 times, most recently from 431a8b9 to 70abbcd Compare March 30, 2026 17:45
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 6 times, most recently from 953ddf4 to 3603df1 Compare April 22, 2026 01:57
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 4 times, most recently from d0cc86f to 4a7ceb4 Compare April 30, 2026 05:02
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 2 times, most recently from a0083fa to 0fd728e Compare April 30, 2026 18:16
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 3 times, most recently from ad1819c to 5290ec9 Compare May 14, 2026 18:12
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch 2 times, most recently from 4b0d5ce to 44a24a0 Compare June 19, 2026 00:14
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 44a24a0 to 5e3b84c Compare July 12, 2026 11:43
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Jul 12, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 5e3b84c to a869079 Compare July 12, 2026 18:11
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Jul 12, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from a869079 to 0896ee7 Compare July 16, 2026 18:17
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Jul 16, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 0896ee7 to 5986ac9 Compare July 17, 2026 08:47
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Jul 17, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 5986ac9 to f1aacfb Compare July 21, 2026 01:12
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Jul 21, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from f1aacfb to 5d5227b Compare July 21, 2026 06:47
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Jul 21, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 5d5227b to b93fdf7 Compare July 25, 2026 19:35
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Jul 25, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from b93fdf7 to 7e1659b Compare July 25, 2026 20:59
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Jul 25, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 7e1659b to 3cf1382 Compare July 30, 2026 17:43
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Jul 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 3cf1382 to c643087 Compare August 1, 2026 17:48
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Aug 1, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from c643087 to 9e3fa01 Compare August 12, 2026 01:45
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Aug 12, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 9e3fa01 to c89961f Compare August 16, 2026 12:33
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v14 [security] fix(deps): update dependency swiper to v12 [security] Aug 16, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from c89961f to 4515d1e Compare August 29, 2026 05:58
@renovate renovate Bot changed the title fix(deps): update dependency swiper to v12 [security] fix(deps): update dependency swiper to v14 [security] Aug 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-swiper-vulnerability branch from 4515d1e to 26ed7d5 Compare August 29, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants