CVE-2021-39286: Cross-site scripting in pywb

pywb Updated 02 Oct 2025

Summary

02/09/2021
Yes i
Moderate
6.1

CVE-2021-39286: Cross-site scripting in pywb. Affects pywb versions < 2.6.0. Fixed in 2.6.0. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Pywb is a Python web archiving toolkit that allows users to replay archived web pages. It provides a way to capture, preserve, and replay web pages in an interactive and user-friendly manner. Pywb is vulnerable to a cross-site scripting (XSS) attack due to a lack of autoescaping in Jinja2 templates.

Vulnerability Detail

The vulnerability in pywb allows an attacker to inject malicious scripts into web pages viewed by users. This can lead to various consequences, such as stealing sensitive information, session hijacking, or performing actions on behalf of the user. The lack of autoescaping in Jinja2 templates enables the execution of arbitrary JavaScript code, making it possible for an attacker to exploit this vulnerability.

How To Fix

Latest published version: 2.10.0 as of 22 Oct 2026

pip install --upgrade "pywb==2.10.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.6.0

This is the first release that contains the fix.

pip install --upgrade "pywb==2.6.0"

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

Conclusion

In conclusion, the pywb package is vulnerable to a cross-site scripting (XSS) attack due to a lack of autoescaping in Jinja2 templates. To mitigate this vulnerability, it is crucial to upgrade to pywb version 2.6.0 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pywb →

Share this vulnerability

FAQ

Pywb is a Python web archiving toolkit that allows users to replay archived web pages.

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by users.

The potential consequences of this vulnerability include stealing sensitive information, session hijacking, and performing actions on behalf of the user.

To fix this vulnerability, you should upgrade pywb to version 2.6.0 or later.

No, there is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version.

How To Fix

Latest published version: 2.10.0 as of 22 Oct 2026

pip install --upgrade "pywb==2.10.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.6.0

This is the first release that contains the fix.

pip install --upgrade "pywb==2.6.0"

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