🌐
GitHub
github.com › pallets › werkzeug › security › advisories › GHSA-px8h-6qxv-m22q
cookie prefixed with `=` can shadow unprefixed cookie · Advisory · pallets/werkzeug · GitHub
A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like =__Host-test=bad for another subdomain. Werkzeug <= 2.2.2 will parse the cookie =__Host-test=bad as __Host-test=bad.
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
2170243 – (CVE-2023-23934) CVE-2023-23934 python-werkzeug: cookie prefixed with = can shadow unprefixed cookie
Red Hat Bugzilla – Bug 2170243 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
🌐
IBM
ibm.com › support › pages › security-bulletin-cookie-parsing-vulnerability-werkzeug-allows-subdomain-cookie-injection-≤-v222-affects-watsonxdata
Security Bulletin: Cookie Parsing Vulnerability in Werkzeug Allows Subdomain Cookie Injection (≤ v2.2.2), affects watsonx.data
3 weeks ago - CVEID: CVE-2023-23934 DESCRIPTION: ... like `=value` instead of `key=value`. A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like `=__Host-test=bad` for another subdomain....
🌐
GitHub
github.com › eric1234 › werkzeug-cookie-prefix-poc
GitHub - eric1234/werkzeug-cookie-prefix-poc: POC for minor werkzeug cookie prefix security issue
This POC demonstrates this by having the curl HTTP command line client have two cookies. One insecure, the other secure. When the server reads the secure cookie it receives the insecure value. I have two versions of the server. One using raw Werkzeug (named w.py), the other using Flask (named f.py).
Author   eric1234
🌐
Vulert
vulert.com › vuln-db › pypi-werkzeug-57270
CVE-2023-23934: Incorrect parsing of nameless cookies leads to __Host- cookies bypass in Werkzeug
These cookies are typically represented as =value instead of the usual key=value format. A compromised application on an adjacent subdomain can exploit this behavior in vulnerable browsers to set a cookie like =__Host-test=bad for another subdomain.
🌐
CloudDefense.ai
clouddefense.ai › cve › 2023 › CVE-2023-23934
CVE-2023-23934: Werkzeug Cookie Parsing Vulnerability
This vulnerability occurs due to Werkzeug, a comprehensive WSGI web application library, improperly parsing nameless cookies which can be exploited by compromised applications on adjacent subdomains.
🌐
HackTricks
book.hacktricks.xyz › home › network services pentesting › pentesting web › werkzeug
Werkzeug / Flask Debug - HackTricks
This script produces the PIN by hashing the concatenated bits, adding specific salts (cookiesalt and pinsalt), and formatting the output. It’s important to note that the actual values for probably_public_bits and private_bits need to be accurately obtained from the target system to ensure the generated PIN matches the one expected by the Werkzeug console.
🌐
Acunetix
acunetix.com › vulnerabilities › web › werkzeug-wsgi-cve-2023-23934-vulnerability-cve-2023-23934
Werkzeug WSGI CVE-2023-23934 Vulnerability (CVE-2023-23934) - Vulnerabilities - Acunetix
Werkzeug is a comprehensive WSGI ... like `=value` instead of `key=value`. A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like `=__Host-test=bad` for another subdomain....
🌐
Vigilance
vigilance.fr › vulnerability › Werkzeug-privilege-escalation-via-Cookie-Key-40658
Vulnerability in Werkzeug: privilege escalation via Cookie Key | Vigilance.fr
February 27, 2023 - An attacker can bypass restrictions of Werkzeug, via Cookie Key, in order to escalate his privileges, identified by CVE-2023-23934.
🌐
Vulert
vulert.com › vuln-db › pypi-werkzeug-70369
CVE-2023-23934: Cookie Parsing Vulnerability in Werkzeug
CVE-2023-23934: Cookie Parsing Vulnerability in Werkzeug. This vulnerability allows for the exploitation of nameless cookies, potentially leading to session hijacking or unauthorized access to sensitive information.
Find elsewhere
🌐
CVE Details
cvedetails.com › vulnerability-list › vendor_id-17201 › product_id-41301 › Palletsprojects-Werkzeug.html
Palletsprojects Werkzeug : Security vulnerabilities, CVEs
February 3, 2018 - Werkzeug is a comprehensive WSGI ... like `=value` instead of `key=value`. A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like `=__Host-test=bad` for another subdomain....
🌐
Medium
medium.com › @starlaurentius › playing-admin-with-signed-cookies-a-hands-on-example-f2eb6027e381
Playing Admin With Signed Cookies — A Hands-on Example | by Lorenzo Stella | Medium
August 22, 2023 - It is litterally as easy as intercepting some network traffic in the clear, fetching the cookie and inserting it into our HTTP requests. Another way to exploit cookies is for example to retreive an authentication cookie for a user-level login and change its value to make the server think you are logged in as an admin:
🌐
GitHub
github.com › grav3m1nd-byte › werkzeug-pin
GitHub - grav3m1nd-byte/werkzeug-pin: Yet another Werkzeug Console Pin Exploit Explanation · GitHub
They are unlikely to be contained ... '0') for x in range(0, len(num), group_size)) break else: rv = num return rv, cookie_name · From this function, the following variables need to be exploited to get the console PIN:...
Author   grav3m1nd-byte
🌐
Mizu
mizu.re › post › abusing-client-side-desync-on-werkzeug
Abusing Client-Side Desync on Werkzeug. Tags:Article - Article - Web - Request_Smuggling
Therefore, even if the cookies aren't sent over the first requests, they will be accessible from the JavaScript after the exploitation. In section HTTP request parsing error in Werkzeug, we exposed a request smuggling vulnerability in Werkzeug 2.1.0 to 2.1.1, without exposing any security risk.
🌐
Greg Scharf
blog.gregscharf.com › 2023 › 04 › 09 › lfi-to-rce-in-flask-werkzeug-application
LFI to RCE in Flask Werkzeug Application :: Greg Scharf — Development & Security
April 10, 2023 - GET /download?fn=../../../../app/venv/lib/python3.10/site-packages/werkzeug/debug/__init__.py · To reverse the PIN you’ll want to pull the code out of __init__.py that generates the PIN and cookie. That code is included below. You’ll only need two Python libraries to make that work, which I’ve also included in the modified script below.
🌐
GitHub
github.com › rapid7 › metasploit-framework › blob › master › documentation › modules › exploit › multi › http › werkzeug_debug_rce.md
metasploit-framework/documentation/modules/exploit/multi/http/werkzeug_debug_rce.md at master · rapid7/metasploit-framework
Do: set FLASKPATH /usr/local/lib/<python3.version>/site-packages/flask/app.py (where <python3.version> matches the version on the system being exploited) ... You should see a failure due to the check failing. Method of authentication. Valid values are: generated-cookie: Cookie generated from information provided about the application's environment. When this mode is used, the following additional options must be set: APPNAME: The name of the application according to Werkzeug.
Author   rapid7
🌐
Medium
notdodo.medium.com › write-up-hack-the-box-oz-e7546749991a
Write-up: Hack The Box — Oz. Description | by Edoardo Rosa | Medium
January 15, 2019 - First we have to identify which engine the web app is using (Make, Jinja2, Twig, …): since Jinja2 is the most used one we can try to inject {{2+2}},if the application returns 4 it’s possible to exploit the application to run Python code. import requests url = "http://10.10.10.96:8080/" data = {"username": "wizard.oz", "password": "wizardofoz22"} header = { "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" } sess = requests.Session() sess.headers.update(header) sess.post(url + "login", data=data) print(sess.cookies.get_dict()) exploit = {"name": "{{2+2}}", "desc": "desc"} r = sess.post(url, data=exploit, allow_redirects=False) print(r.text)