kelvinmo/simplejwt
SimpleJWT is a PHP library for JSON Web Tokens, signatures, and encryption. It supports JWK and COSE keys, HMAC/RSA/ECDSA/EdDSA signatures, key management, and AES encryption. Requires PHP 8+ with gmp, hash, openssl, and sodium for EdDSA/X25519.
/oauth/token endpoints).zip:DEF decompression path now validates decompressed data length before use. This closes a decompression-bomb / DoS vector where a maliciously crafted JWE payload could force excessive memory allocation. Relevant to any decision involving accepting JWEs from untrusted parties (partner integrations, public webhooks, multi-tenant token exchange) — treat as a mandatory patch floor, not a feature.zip:DEF is enabled. Pin a minimum version in composer.json so no environment can fall back to a vulnerable build.firebase/php-jwt (if used) with this package for consistency.Adopt if:
zip:DEF. If you already accept JWEs from external callers, upgrading is cheaper than building your own payload-size guards.Look elsewhere if:
league/oauth2-server).firebase/php-jwt).*"This package modernizes our authentication stack by replacing ad-hoc JWT solutions with a RFC-compliant, actively maintained library. It enables:
*"SimpleJWT is a drop-in replacement for firebase/php-jwt with critical upgrades:
firebase/php-jwt in benchmarks).zip:DEF decompression now validates output length — mitigates decompression-bomb DoS on JWE inputs. Non-breaking, no API changes; a pure patch bump.
Migration Path:firebase/php-jwt with kelvinmo/simplejwt in composer.json (require ^1.1.3 minimum).SimpleJWT\JWT/SimpleJWT\JWE.zip:DEF, bump the constraint and re-run payload round-trip tests against large/compressed inputs.
Trade-offs: No CLI tools (but kelvinmo/jwkstool exists separately). Still no upstream max-payload knob surfaced publicly — consider enforcing request body size limits at the gateway as defense-in-depth."*How can I help you explore Laravel packages today?