Swiper Prototype Pollution Vulnerability

Vulnerability

A prototype pollution vulnerability exists in the Swiper package, specifically in versions prior to 6.5.1. This vulnerability allows attackers to inject properties into the Object prototype, potentially leading to unauthorized modifications that could be exploited within the application. The issue arises from the 'extendDefaults' function, which recursively merges objects without proper validation, allowing manipulation of the prototype chain.

Impact

Exploitation of this vulnerability allows for prototype pollution, where an attacker can inject properties into the Object prototype. This can lead to various consequences, including remote code execution, denial of service, or tampering with application logic by manipulating inherited properties.

Reproduction

To reproduce this vulnerability, use a version of Swiper prior to 6.5.1. The vulnerability can be triggered by calling the 'extendDefaults' function with a payload that includes a '__proto__' property. This payload will be parsed and the injected property will be added to the Object prototype, demonstrating the pollution.

Remediation

Users can upgrade to Swiper version 6.5.1 or later to address this vulnerability.

Added: May 15, 2026, 10:04 AM
Updated: May 15, 2026, 10:04 AM

Vulnerability Rating

Custom Algorithm
spread
4.2
impact
2.5
exploitability
6.0
remediation
7.7
relevance
0.0
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.