Skip to content

Security: python-jose has known CVEs — should be replaced with PyJWT or python-jwt #145

@patel-prithvi

Description

@patel-prithvi

Security: python-jose dependency has known CVEs — replace with PyJWT

Summary

pyproject.toml lists python-jose[cryptography]>=3.3.0 as a dependency. The python-jose library has multiple known vulnerabilities including:

  • CVE-2024-33663: Algorithm confusion attack allowing JWT signature bypass
  • CVE-2024-33664: Unsafe handling of RSA keys
  • The library is largely unmaintained (last release 2023, open issues unaddressed)

Evidence

# pyproject.toml line 17
"python-jose[cryptography]>=3.3.0",

Why This Is Risky for ExtensionShield

ExtensionShield uses JWTs for cloud authentication (when EXTSHIELD_MODE=cloud). An algorithm confusion vulnerability in the JWT library means an attacker could:

  1. Forge a JWT token without knowing the signing secret
  2. Impersonate any user, including admins
  3. Bypass the cloud authentication entirely

Proposed Fix

Replace python-jose with PyJWT, the actively maintained alternative:

# pyproject.toml — replace:
# "python-jose[cryptography]>=3.3.0",
# with:
"PyJWT[crypto]>=2.8.0",

Update any imports in the codebase:

# Before
from jose import jwt, JWTError
# After  
import jwt
from jwt.exceptions import InvalidTokenError

References

Impact

Critical — JWT forgery could allow complete authentication bypass in cloud mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions