Skip to content

security: CVE-2026-32597 - PyJWT 2.8.0 - crit header bypass, upgrade to 2.12.0 #2

Description

@vks-archastro

Summary

PyJWT==2.8.0 in apiserver/requirements/base.txt does not validate the crit (Critical) header parameter per RFC 7515 §4.1.11. An attacker can craft tokens with unknown critical extensions that PyJWT silently accepts, bypassing any security policies encoded in JWT headers.


CVE Details

  • CVE: CVE-2026-32597
  • Advisory: GHSA-752w-5fwx-jx9f
  • Severity: HIGH — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (7.5)
  • CWE: CWE-345 (Insufficient Verification of Data Authenticity), CWE-863 (Incorrect Authorization)

Package Details

  • Package: PyJWT
  • Current version: 2.8.0
  • Fixed version: 2.12.0
  • File: apiserver/requirements/base.txt

Impact

RFC 7515 §4.1.11 states a JWS is invalid if it contains crit header extensions not understood by the recipient. PyJWT accepts such tokens instead of rejecting them.

Exploitation scenarios:

  • Policy bypass: Any custom JWT enforcement via crit (MFA required, scope restrictions, token binding per RFC 7800) is silently ignored by PyJWT
  • Split-brain deployments: API gateway with compliant library rejects → Plane backend with PyJWT accepts — authentication inconsistency
  • Token forgery: Attacker crafts token with crit extension that encodes elevated privileges; backend never validates the extension

Affected Code

All JWT verification in the Plane apiserver authentication stack (apiserver/), specifically any call to jwt.decode(...).


Triage Reasoning

Escalating because:

  1. Direct impact on authentication integrity
  2. 2.8.0 → 2.12.0 minor version bump — behavioral changes in JWT decoding warrant human review and test validation
  3. Audit required: are there any custom crit header usages (or assumptions about no crit) in existing token handling?

Recommended Action

  1. In apiserver/requirements/base.txt, change PyJWT==2.8.0PyJWT==2.12.0
  2. Review all jwt.decode() call sites — check options dict for verify_signature, verify_exp, etc.
  3. Test auth flows (login, session token, API key) post-upgrade
  4. Confirm Plane does not issue tokens with crit headers (in which case this is lower exploitability)

Mitigations In Place

  • If Plane only issues HS256 tokens without crit headers (likely for internal auth), exploitability requires attacker to supply a crafted token — still a bypass risk but reduced in practice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions