Skip to content
Heist/ feed
Back to feed
CriticalFix available

joserfc has Possible Uncontrolled Resource Consumption Vulnerability Triggered by Logging Arbitrarily Large JWT Token Payloads

Type: advisorySources: OSV

### Summary The `ExceededSizeError` exception messages are embedded with non-decoded JWT token parts and may cause Python logging to record an arbitrarily large, forged JWT payload. ### Details In situations where a misconfigured — or entirely absent — production-grade web server sits in front of a Python web application, an attacker may be able to send arbitrarily large bearer tokens in the HTTP request headers. When this occurs, Python logging or diagnostic tools (e.g., Sentry) may end up processing extremely large log messages containing the full JWT header during the `joserfc.jwt.decode()` operation. The same behavior also appears when validating claims and signature payload sizes, as the library raises `joserfc.errors.ExceededSizeError()` with the full payload embedded in the exception message. Since the payload is already fully loaded into memory at this stage, the library cannot prevent or reject it per se. It is therefore the responsibility of the underlying web server (`uvicorn`/`h11`, `gunicorn`, `Starlette`, `Werkzeug`, `nginx`...etc) to enforce limits on header sizes. For example, a `FastAPI`/`Starlette` application running _without_ `uvicorn` and/or `gunicorn` cannot enforce header size limits on its own. With `uvicorn`/`h11`, the [--h11-max-incomplete-event-size ](https://uvicorn.dev/settings/#implementation:~:text=%2D%2Dh11%2Dmax%2Dincomplete%2Devent%2Dsize%20%3Cint%3E) option can restrict the total size of the header _plus_ body, but not the header alone. Simi

Products
joserfc
Affected versions
1.3.3, 1.3.4, 1.4.0, 1.4.1
Fixed versions
1.3.5, 1.4.2
CVEs
CVE-2025-65015
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 18:51 UTC · Revision 1

Source evidence

joserfc has Possible Uncontrolled Resource Consumption Vulnerability Triggered by Logging Arbitrarily Large JWT Token Payloads

core-osv · Original source

Published 18 Nov 2025, 18:26 UTC

### Summary The `ExceededSizeError` exception messages are embedded with non-decoded JWT token parts and may cause Python logging to record an arbitrarily large, forged JWT payload. ### Details In situations where a misconfigured — or entirely absent — production-grade web server sits in front of a Python web application, an attacker may be able to send arbitrarily large bearer tokens in the HTTP request headers. When this occurs, Python logging or diagnostic tools (e.g., Sentry) may end up processing extremely large log messages containing the full JWT header during the `joserfc.jwt.decode()` operation. The same behavior also appears when validating claims and signature payload sizes, as the library raises `joserfc.errors.ExceededSizeError()` with the full payload embedded in the exception message. Since the payload is already fully loaded into memory at this stage, the library cannot prevent or reject it per se. It is therefore the responsibility of the underlying web server (`uvicorn`/`h11`, `gunicorn`, `Starlette`, `Werkzeug`, `nginx`...etc) to enforce limits on header sizes. For example, a `FastAPI`/`Starlette` application running _without_ `uvicorn` and/or `gunicorn` cannot enforce header size limits on its own. With `uvicorn`/`h11`, the [--h11-max-incomplete-event-size ](https://uvicorn.dev/settings/#implementation:~:text=%2D%2Dh11%2Dmax%2Dincomplete%2Devent%2Dsize%20%3Cint%3E) option can restrict the total size of the header _plus_ body, but not the header alone. Simi

osv:GHSA-frfh-8v73-gjg4

joserfc

Fixed versions: 1.3.5

joserfc

Fixed versions: 1.4.2

Complete source record
{
  "id": "b76a6df19a381c7a088b3c64b7f432eb59a4de490f6a74b6d0e5eafbf1256797",
  "url": "https://osv.dev/vulnerability/GHSA-frfh-8v73-gjg4",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "joserfc has Possible Uncontrolled Resource Consumption Vulnerability Triggered by Logging Arbitrarily Large JWT Token Payloads",
    "summary": "### Summary The `ExceededSizeError` exception messages are embedded with non-decoded JWT token parts and may cause Python logging to record an arbitrarily large, forged JWT payload. ### Details In situations where a misconfigured — or entirely absent — production-grade web server sits in front of a Python web application, an attacker may be able to send arbitrarily large bearer tokens in the HTTP request headers. When this occurs, Python logging or diagnostic tools (e.g., Sentry) may end up processing extremely large log messages containing the full JWT header during the `joserfc.jwt.decode()` operation. The same behavior also appears when validating claims and signature payload sizes, as the library raises `joserfc.errors.ExceededSizeError()` with the full payload embedded in the exception message. Since the payload is already fully loaded into memory at this stage, the library cannot prevent or reject it per se. It is therefore the responsibility of the underlying web server (`uvicorn`/`h11`, `gunicorn`, `Starlette`, `Werkzeug`, `nginx`...etc) to enforce limits on header sizes. For example, a `FastAPI`/`Starlette` application running _without_ `uvicorn` and/or `gunicorn` cannot enforce header size limits on its own. With `uvicorn`/`h11`, the [--h11-max-incomplete-event-size ](https://uvicorn.dev/settings/#implementation:~:text=%2D%2Dh11%2Dmax%2Dincomplete%2Devent%2Dsize%20%3Cint%3E) option can restrict the total size of the header _plus_ body, but not the header alone. Simi",
    "evidence": "osv:GHSA-frfh-8v73-gjg4",
    "products": [
      {
        "name": {
          "value": "joserfc",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.3.5",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.3.3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.4",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "joserfc",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.4.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.4.0",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.1",
            "evidence": "/affected/1/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "GHSA-frfh-8v73-gjg4",
      "aliases": [
        "CVE-2025-65015",
        "GHSA-frfh-8v73-gjg4",
        "PYSEC-2026-361"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.3.3"
                },
                {
                  "fixed": "1.3.5"
                }
              ]
            }
          ],
          "package": {
            "name": "joserfc",
            "purl": "pkg:pypi/joserfc",
            "ecosystem": "PyPI"
          },
          "versions": [
            "1.3.3",
            "1.3.4"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-frfh-8v73-gjg4/GHSA-frfh-8v73-gjg4.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.4.0"
                },
                {
                  "fixed": "1.4.2"
                }
              ]
            }
          ],
          "package": {
            "name": "joserfc",
            "purl": "pkg:pypi/joserfc",
            "ecosystem": "PyPI"
          },
          "versions": [
            "1.4.0",
            "1.4.1"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-frfh-8v73-gjg4/GHSA-frfh-8v73-gjg4.json"
          }
        }
      ],
      "modified": "2026-10-27T17:45:03.878277565Z",
      "provider": "osv",
      "references": [
        "https://github.com/authlib/joserfc/security/advisories/GHSA-frfh-8v73-gjg4",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-65015",
        "https://github.com/authlib/joserfc/commit/63932f169d924caffafa761af2122b82059017f7",
        "https://github.com/authlib/joserfc/commit/673c8743fd0605b0e1de6452be6cba75f44e466b",
        "https://github.com/authlib/joserfc",
        "https://github.com/authlib/joserfc/releases/tag/1.3.5",
        "https://github.com/authlib/joserfc/releases/tag/1.4.2",
        "https://github.com/pypa/advisory-database/tree/main/vulns/joserfc/PYSEC-2026-361.yaml",
        "https://pypi.org/project/joserfc"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-770"
        ],
        "severity": "CRITICAL",
        "github_reviewed": true,
        "nvd_published_at": "2025-11-18T23:15:56Z",
        "github_reviewed_at": "2025-11-18T18:26:04Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-65015",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 463045,
  "published_at": "2025-11-18T18:26:04+00:00"
}