SB20261109227 - Multiple vulnerabilities in lua-resty-jwt
Published: November 9, 2026
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 7 vulnerabilities.
1) Input validation error (CVE-ID: N/A)
CWE-ID: CWE-20 - Improper input validation
CVSSv4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to bypass token revocation, replay prevention, or rate limits in applications that identify tokens by their raw string or its hash.
The vulnerability exists due to lenient compact-serialization parsing in lua-resty-jwt that accepts noncanonical segment structures and encodings during verification. An unauthenticated remote attacker can re-encode a previously valid token into a different string that still verifies, evading checks for revoked or already-used tokens.
2) Improper Authentication (CVE-ID: N/A)
CWE-ID: CWE-287 - Improper Authentication
CVSSv4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to bypass authentication using forged tokens.
The vulnerability exists due to lua-resty-jwt accepting public key PEM text as a PBES2 password when applications use that key to verify asymmetrically signed JWTs and receive an attacker-supplied JWE. An unauthenticated remote attacker can encrypt a JWE using the known public key text and have attacker-chosen claims accepted as authenticated.
3) Improper Verification of Cryptographic Signature (CVE-ID: N/A)
CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature
CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to forge arbitrary JSON Web Tokens that affected applications accept as valid.
The vulnerability exists due to algorithm confusion in lua-resty-jwt when applications verify tokens using an RSA or EC public key without configuring an algorithm whitelist. An unauthenticated remote attacker can select an HMAC algorithm in the token header and sign forged tokens using the public key's PEM text as the secret.
4) Resource exhaustion (CVE-ID: N/A)
CWE-ID: CWE-400 - Resource exhaustion
CVSSv4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to exhaust nginx worker CPU resources and deny service to affected applications.
The vulnerability exists due to unbounded PBKDF2 iteration counts during JWE parsing in lua-resty-jwt before authentication, with no algorithm whitelist enforcement for JWE tokens. An unauthenticated remote attacker can submit a JWE using PBES2-HS512+A256KW with an arbitrarily large p2c header to trigger expensive key derivation even when decryption ultimately fails.
5) Observable discrepancy (CVE-ID: N/A)
CWE-ID: CWE-203 - Observable discrepancy
CVSSv4: 8.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to recover plaintext from encrypted JWE tokens through a padding/decryption oracle.
The vulnerability exists due to lua-resty-jwt decrypting AES-CBC-HMAC ciphertext and validating claims before checking the authentication tag. An unauthenticated remote attacker can submit modified tokens to an application that exposes validation failure reasons and use distinguishable errors to infer encrypted token contents.
6) NULL pointer dereference (CVE-ID: N/A)
CWE-ID: CWE-476 - NULL Pointer Dereference
CVSSv4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to crash nginx worker processes and cause sustained denial of service.
The vulnerability exists due to a NULL pointer dereference in the lua-resty-jwt OpenSSL FFI layer when verifying an ECDSA JWT using an RSA public key or certificate without algorithm restrictions from jwt:set_alg_whitelist. An unauthenticated remote attacker can repeatedly submit JWTs specifying an ECDSA algorithm with correctly sized signatures to keep workers crashing.
7) Improper validation of integrity check value (CVE-ID: N/A)
CWE-ID: CWE-354 - Improper Validation of Integrity Check Value
CVSSv4: 8.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated remote attacker to forge encrypted tokens accepted as verified by lua-resty-jwt.
The vulnerability exists due to missing authentication tag length validation when processing JWE tokens using AES-GCM content encryption or key wrapping. An unauthenticated remote attacker with an observed token and correctly guessed plaintext can modify its ciphertext and brute-force a one-byte tag in about 256 attempts on average to produce an accepted forgery.
Remediation
Install update from vendor's website.
References
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-v6j5-wh7j-2ggg
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-85rg-93pf-mg8c
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-wm36-g7wp-x24w
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-c526-qc23-r353
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-4jwm-wqj5-pr89
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-8g6x-8538-rvj8
- https://github.com/cdbattags/lua-resty-jwt/security/advisories/GHSA-gvf3-mm6g-94wp