Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 91%

CVE-2026-49852: CWE-287: Improper Authentication in authlib joserfc

0
High
Published: 07/17/2026 (07/17/2026, 19:14:58 UTC)
Source: GCVE Database
Vendor/Project: authlib
Product: joserfc

Description

joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.6.8, joserfc.jwt.decode accepts attacker-forged HMAC-signed tokens when the caller-supplied verification key is the empty string or None, because HMACAlgorithm.sign and HMACAlgorithm.verify in src/joserfc/_rfc7518/jws_algs.py pass the output of OctKey.get_op_key(...) to hmac.new(...) and OctKey.import_key in src/joserfc/_rfc7518/oct_key.py only emits a SecurityWarning for keys shorter than 14 bytes without rejecting zero-length input. This issue is fixed in version 1.6.8.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

PyPIghsa
joserfc
Affected versions
<1.6.8

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/18/2026, 11:19:22 UTC

Technical Analysis

joserfc versions <= 1.6.7 have a vulnerability in their HMAC verification implementation where the verify function accepts empty or nil keys without rejection. The OctKey.import_key method issues only a warning for keys shorter than 14 bytes but does not reject zero-length keys, which are then used in hmac.new calls. This allows attackers to forge HMAC-signed JWT tokens if the application’s verification key is empty or None, a condition that can arise from unset environment variables, missing database entries, or default empty strings. This vulnerability is a cross-language sibling of CVE-2026-45363 affecting ruby-jwt. Unlike ruby-jwt and other libraries that enforce non-empty keys, joserfc lacks such a check, making it vulnerable to token forgery without requiring authentication.

Potential Impact

An attacker can forge valid HMAC-signed JWT tokens if the application uses joserfc for JWT verification and the configured secret key is empty or None. This effectively bypasses signature verification, allowing unauthorized access or privilege escalation in systems relying on joserfc for JWT authentication. The vulnerability requires no privileges or user interaction but depends on the operator misconfiguring or failing to set the JWT secret properly.

Mitigation Recommendations

No official patch or fixed release is currently available for joserfc. Operators must ensure that the JWT secret key used for verification is never empty or None. Applications should implement additional validation to reject empty keys before passing them to joserfc.jwt.decode. Monitor vendor advisories for updates or patches addressing this issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-gg9x-qcx2-xmrh
Osv Schema Version
1.4.0
Aliases
["CVE-2026-49852"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6a46ecbb27e9c7971943cddf

Added to database: 07/02/2026, 22:56:59 UTC

Last enriched: 07/18/2026, 11:19:22 UTC

Last updated: 07/21/2026, 05:59:42 UTC

Views: 38

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses