Vulnerabilities in pkg:pypi/quart

PACKAGE
Advisory Summary

GHSA-v853-p72q-4cfw is a HIGH (CVSS 7.5) quart leaks raw request body vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Quart libraries in the PyPI ecosystem. The issue involves quart leaks raw request body (incl. plaintext passwords) to stdout via stray debug print in body.__await__. Remediation is available by upgrading affected packages to version 0.23.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/quart

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/quart. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-v853-p72q-4cfw - HIGH Quart leaks raw request body (incl. plaintext passwords) to stdout via stray debug print in Body.__await__

GHSA-v853-p72q-4cfw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-v853-p72q-4cfw
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Quart
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-v853-p72q-4cfw

To remediate this vulnerability, upgrade all affected Quart dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

quart fixed: 0.23.1
pip install quart>=0.23.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show quart

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-v853-p72q-4cfw, inspect your installed packages using pip:

pip show quart

Analyze the terminal output to locate any version of Quart in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.1), your application is affected.

Note: The pip show quart command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Quart, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Quart 0.23.0 contains a stray debug statement (`print(data)`) inside `Body.__await__` in `quart/wrappers/request.py`. Any request whose body is awaited — `await request.form`, `await request.get_data()`, WTForms `validate_on_submit()`, etc. — has its raw, unparsed body printed to stdout, including plaintext form fields such as passwords and CSRF tokens. Confirmed present in 0.23.0, confirmed absent in 0.22.0. ### Details In `src/quart/wrappers/request.py`, `Body.__await__` accumulates the request body into a bytearray: ​```python data = bytearray() while not self._queue.empty(): data.extend(self._queue.get_nowait()) print(data) # <-- not present in 0.22.0 if ( self._max_content_length is not None and len(data) > self._max_content_length ): raise RequestEntityTooLarge() ​``` This fires for every request that awaits its body — the overwhelming majority of POST/PUT routes in a typical Quart app (form submissions, JSON APIs via `request.get_json()`, file uploads, etc.). ### PoC 1. `pip install quart==0.23.0` (requires Python 3.13+) 2. Minimal route: ​```python @app.route("/login", methods=["POST"]) async def login(): form_data = await request.form ... ​``` 3. Submit a POST with form data, e.g. a login form with `staff_id`/`password` fields. 4. Observe stdout: the full raw body is printed as `bytearray(b'csrf_token=...&staff_id=...&password=...')`. Confirmed via source diff against 0.22.0's `request.py`, where this line does not exist. ### Impact Any app that captures stdout in logs (terminal redirect, systemd/journald, Docker logs, cloud log aggregation, etc.) will have every submitted form body — including login credentials — written to logs in plaintext. This affects any Quart 0.23.0 app handling authentication or any sensitive form data, and is trivially triggerable by any user simply submitting a form (no attacker action required beyond normal use).

GHSA-v853-p72q-4cfw Affected Quart Versions

1 component(s)
Fixed Versions:
0.23.1
Product / Package Ecosystem Affected Versions Fixed Version
quart
PyPI
≥ 0.23.0
< 0.23.1
All 1 versions
0.23.0
0.23.1

References

Frequently Asked Questions

What is GHSA-v853-p72q-4cfw?
GHSA-v853-p72q-4cfw is a security vulnerability in Quart involving Quart leaks raw request body (incl. plaintext passwords) to stdout via stray debug print in Body.__await__ under CWE-532: Insertion of Sensitive Information into Log File.
Which Quart versions are affected?
Affected versions include releases prior to 0.23.1 across affected packages: quart.
What version fixes GHSA-v853-p72q-4cfw?
Upgrading to 0.23.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is quart affected?
Yes, quart is affected in releases prior to 0.23.1. Upgrade your dependency to 0.23.1 or later.
What is the CVSS score of GHSA-v853-p72q-4cfw?
GHSA-v853-p72q-4cfw has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-v853-p72q-4cfw?
GHSA-v853-p72q-4cfw is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check PyPI dependencies for GHSA-v853-p72q-4cfw?
Run the dependency tree command: 'pip show quart'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v853-p72q-4cfw",
  "modified" : "2026-10-05T22:49:44Z",
  "published" : "2026-10-05T22:49:44Z",
  "aliases" : [ ],
  "summary" : "Quart leaks raw request body (incl. plaintext passwords) to stdout via stray debug print in Body.__await__",
  "details" : "### Summary\nQuart 0.23.0 contains a stray debug statement (`print(data)`) inside `Body.__await__` in `quart/wrappers/request.py`. Any request whose body is awaited — `await request.form`, `await request.get_data()`, WTForms `validate_on_submit()`, etc. — has its raw, unparsed body printed to stdout, including plaintext form fields such as passwords and CSRF tokens. Confirmed present in 0.23.0, confirmed absent in 0.22.0.\n\n### Details\nIn `src/quart/wrappers/request.py`, `Body.__await__` accumulates the request body into a bytearray:\n\n​```python\ndata = bytearray()\nwhile not self._queue.empty():\n    data.extend(self._queue.get_nowait())\n    print(data)          # <-- not present in 0.22.0\n    if (\n        self._max_content_length is not None\n        and len(data) > self._max_content_length\n    ):\n        raise RequestEntityTooLarge()\n​```\n\nThis fires for every request that awaits its body — the overwhelming majority of POST/PUT routes in a typical Quart app (form submissions, JSON APIs via `request.get_json()`, file uploads, etc.).\n\n### PoC\n1. `pip install quart==0.23.0` (requires Python 3.13+)\n2. Minimal route:\n​```python\n@app.route(\"/login\", methods=[\"POST\"])\nasync def login():\n    form_data = await request.form\n    ...\n​```\n3. Submit a POST with form data, e.g. a login form with `staff_id`/`password` fields.\n4. Observe stdout: the full raw body is printed as `bytearray(b'csrf_token=...&staff_id=...&password=...')`.\n\nConfirmed via source diff against 0.22.0's `request.py`, where this line does not exist.\n\n### Impact\nAny app that captures stdout in logs (terminal redirect, systemd/journald, Docker logs, cloud log aggregation, etc.) will have every submitted form body — including login credentials — written to logs in plaintext. This affects any Quart 0.23.0 app handling authentication or any sensitive form data, and is trivially triggerable by any user simply submitting a form (no attacker action required beyond normal use).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "quart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.23.0"
      }, {
        "fixed" : "0.23.1"
      } ]
    } ],
    "versions" : [ "0.23.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pallets/quart/security/advisories/GHSA-v853-p72q-4cfw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pallets/quart/commit/e8eb3b8a0cb98e7574bf3841312fc7f96883d055"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pallets/quart"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pallets/quart/releases/tag/0.23.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-05T22:49:44Z",
    "nvd_published_at" : null
  }
}