CVE-2023-23934: Werkzeug - Cookie Prefix Vulnerability

python-werkzeug Updated 02 Oct 2025

Summary

14/02/2023
N/A
Yes i
Low
3.5

CVE-2023-23934: Werkzeug is a comprehensive WSGI web application library. Affects python-werkzeug across 3 version ranges.

< 1.0.1+dfsg1-2+deb11u1 < 22a254fca2ad0130adbbcbd11d3de51bcb04a08b < cf275f42acad1b5950c50ffe8ef58fe62cdce028

Fixed in 1.0.1+dfsg1-2+deb11u1. 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

Werkzeug is a comprehensive WSGI web application library. It provides a set of utilities for building web applications in Python. Werkzeug allows developers to handle HTTP requests and responses, routing, and other web-related tasks. It is widely used in various Python web frameworks and applications.

Vulnerability Detail

The vulnerability in Werkzeug, identified as CVE-2023-23934, involves the parsing of cookies with a prefix of '='. Certain browsers allow the creation of 'nameless' cookies that appear as '=value' instead of 'key=value'. This vulnerability can be exploited by a compromised application on an adjacent subdomain to set a cookie with a prefix of '__Host-' for another subdomain. Werkzeug versions prior to 2.2.3 incorrectly parse such cookies, resulting in the valid cookie key being shadowed by the bad cookie value. This issue can be triggered when a vulnerable or malicious subdomain sets a cookie using a vulnerable browser, and a Werkzeug application running on an adjacent subdomain encounters the bad cookie value.

How To Fix

Minimum fixed version

1.0.1+dfsg1-2+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

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 Werkzeug to mitigate the risk.

Conclusion

The vulnerability in Werkzeug allows for the manipulation of cookies with a prefix of '='. This can lead to potential security risks and unauthorized access to sensitive information. It is crucial to update to Werkzeug version 2.2.3 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for python-werkzeug →

Share this vulnerability

FAQ

Werkzeug is a WSGI web application library for Python. It provides utilities for handling HTTP requests and responses, routing, and other web-related tasks.

This vulnerability allows a compromised application on an adjacent subdomain to set a cookie with a prefix of '__Host-' for another subdomain. This can lead to potential security issues and unauthorized access to sensitive information.

Versions of Werkzeug prior to 2.2.3 are affected by this vulnerability. It is recommended to upgrade to version 2.2.3 or later.

No, there are no known workarounds for this vulnerability. Updating to the fixed version of Werkzeug is the recommended solution.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

Related vulnerabilities

Recent vulnerabilities recorded for python-werkzeug.

How To Fix

Minimum fixed version

1.0.1+dfsg1-2+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

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