CVE-2021-23370: Prototype Pollution in swiper

swiper Updated 02 Oct 2025

Summary

10/05/2021
Yes i
Critical
9.8

CVE-2021-23370: Prototype Pollution in swiper. Affects swiper versions < 6.5.1. Fixed in 6.5.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Swiper is an npm package that provides a mobile touch slider and framework with hardware accelerated transitions. It is widely used for creating responsive and interactive web applications. However, versions of the package swiper before 6.5.1 are susceptible to prototype pollution.

Vulnerability Detail

Prototype pollution is a vulnerability that occurs when an attacker can inject properties into existing JavaScript objects. In the case of swiper, this vulnerability allows an attacker to modify the prototype of an object, leading to potential remote code execution, data tampering, or denial of service attacks. This can have severe consequences for applications that use swiper, as it can be exploited to bypass security measures and gain unauthorized access to sensitive information.

How To Fix

Minimum fixed version

6.5.1

This is the first release that contains the fix.

npm install swiper@6.5.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of the swiper package to mitigate the risk.

Conclusion

In conclusion, the swiper package before version 6.5.1 is vulnerable to prototype pollution, which can have severe consequences for applications using this package. It is crucial to update to version 6.5.1 or later to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for swiper →

Share this vulnerability

FAQ

Prototype pollution is a vulnerability that allows an attacker to inject properties into existing JavaScript objects, potentially leading to remote code execution or data tampering.

This vulnerability affects versions of the swiper package before 6.5.1. It allows an attacker to modify the prototype of an object, which can lead to various security issues.

The consequences of this vulnerability can include remote code execution, data tampering, and denial of service attacks. It can be exploited to bypass security measures and gain unauthorized access to sensitive information.

Yes, the fix for this vulnerability is available in version 6.5.1 of the swiper package. It is recommended to update to this version to mitigate the risk.

There are no known workarounds for this vulnerability. Updating to the fixed version of the swiper package is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for swiper.

How To Fix

Minimum fixed version

6.5.1

This is the first release that contains the fix.

npm install swiper@6.5.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback