CVE-2025-45769 Overview
CVE-2025-45769 affects Google Firebase php-jwt version 6.11.0, a widely deployed PHP library for creating and validating JSON Web Tokens (JWT). The advisory reports weak encryption behavior related to how the library handles cryptographic key material. The issue is categorized under [CWE-326: Inadequate Encryption Strength].
The CVE Record carries a dispute. The maintainers argue that key length selection is the responsibility of the calling application, not the library itself. The dispute is under review per CNA rules 4.1.4 and 4.1.14. Applications that pass short or low-entropy keys to php-jwt remain exposed regardless of the outcome.
Critical Impact
Weak key handling in php-jwt v6.11.0 can allow attackers to brute-force JWT signing secrets, forge tokens, and impersonate authenticated users over the network.
Affected Products
- Google Firebase php-jwt v6.11.0
- Applications embedding vulnerable versions of firebase/php-jwt as a Composer dependency
- Downstream frameworks and SDKs that rely on php-jwt for token signing and validation
Discovery Timeline
- 2025-07-31 - CVE-2025-45769 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-45769
Vulnerability Analysis
The vulnerability concerns weak encryption strength in php-jwt v6.11.0. JSON Web Tokens signed with HMAC algorithms such as HS256, HS384, or HS512 rely on the entropy of the shared secret. If the library accepts secrets that are shorter than the algorithm's output length, an attacker can perform offline brute-force or dictionary attacks against captured tokens.
Once a secret is recovered, the attacker can forge arbitrary JWTs. Forged tokens allow session impersonation, privilege escalation within the application, and bypass of authorization checks. The attack occurs over the network and does not require prior authentication or user interaction.
The maintainer dispute focuses on responsibility. Guidance from RFC 7518 requires HMAC keys to be at least as long as the hash output, but the library did not enforce this constraint in v6.11.0. Applications that generate short secrets, reuse passwords, or pull keys from low-entropy sources inherit the weakness.
Root Cause
The root cause is inadequate validation of key strength before signing or verifying tokens. The library did not reject keys that fell below the minimum length recommended for the selected HMAC algorithm. See the GitHub PHP-JWT Issue Tracker and GitHub PHP-JWT Pull Request for the technical discussion.
Attack Vector
An attacker captures a signed JWT emitted by the target application. The attacker then runs an offline brute-force attack against the HMAC signature using common password lists or exhaustive search across short key spaces. Once the secret is recovered, the attacker mints new tokens with arbitrary claims and submits them to the application to gain unauthorized access.
Refer to the GitHub Security Advisory and the GitHub Gist Code Snippet for demonstration material.
Detection Methods for CVE-2025-45769
Indicators of Compromise
- Unexpected successful authentications using JWTs whose iat or exp claims fall outside normal issuance patterns
- Repeated JWT verification failures followed by a successful verification from the same client IP, suggesting key-guessing attempts
- JWT payloads containing elevated roles, administrative claims, or user identifiers that were not issued by the application's token service
Detection Strategies
- Inventory Composer dependencies across PHP applications and flag any project pinning firebase/php-jwt at v6.11.0 or earlier
- Audit application configuration to identify HMAC signing secrets shorter than 32 bytes for HS256, 48 bytes for HS384, or 64 bytes for HS512
- Enable verbose logging on token verification failures and correlate failures with subsequent successful requests from the same source
Monitoring Recommendations
- Forward web application and authentication logs to a centralized analytics platform for correlation of JWT verification anomalies
- Alert on privileged actions performed by sessions whose JWTs were minted outside the identity provider's issuance window
- Track dependency updates in CI/CD pipelines and block builds that reintroduce vulnerable php-jwt versions
How to Mitigate CVE-2025-45769
Immediate Actions Required
- Upgrade firebase/php-jwt to v7.0.0 or later, which addresses the key strength concerns raised in the advisory
- Rotate all HMAC signing secrets and invalidate outstanding tokens after the upgrade
- Replace any secrets shorter than the HMAC algorithm output length with cryptographically random values of adequate size
Patch Information
The fixed release is available at GitHub PHP-JWT Release v7.0.0. Review the GitHub Advisory Database Pull Request for the coordinated advisory metadata. Update dependencies via Composer and redeploy affected services.
Workarounds
- Enforce a minimum key length in application code before invoking JWT::encode() or JWT::decode(), rejecting secrets below the algorithm's hash output size
- Migrate from symmetric HMAC signing to asymmetric algorithms such as RS256 or ES256, which rely on private keys rather than shared secrets
- Generate secrets using random_bytes(64) and store them in a secrets manager rather than configuration files or environment variables committed to source control
# Configuration example
composer require firebase/php-jwt:^7.0
php -r "echo bin2hex(random_bytes(64));" > /etc/app/jwt.secret
chmod 600 /etc/app/jwt.secret
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

