CVE-2026-48990: joserfc RFC7797 Payload Size Bypass Leads to Denial of Service
joserfc, a Python library for handling JSON Web Signatures and Encryption, has a flaw in how it processes unencoded JWS payloads (a feature defined in RFC7797). The library correctly enforces maximum payload size limits for standard JWS formats, but bypasses those same limits when processing JWS tokens marked with b64=false, which signals unencoded payloads. An attacker can exploit this inconsistency by sending an oversized JWS token that passes validation despite exceeding configured size restrictions, potentially exhausting server memory and causing denial of service. The vulnerability affects versions 1.3.4 through 1.6.5 and is resolved in version 1.6.7.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-400, CWE-770
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-06-23
NVD description (verbatim)
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In versions 1.3.4 through 1.6.5, joserfc accepts oversized RFC7797 b64=false JWS payloads without applying JWSRegistry.max_payload_length, which can lead to resource exhaustion. The normal JWS compact and flattened JSON paths reject payloads above the configured payload-size limit with ExceededSizeError. The RFC7797 unencoded payload paths do not make the same check. A valid b64=false compact or flattened JSON JWS can therefore deserialize successfully with a payload larger than JWSRegistry.max_payload_length. Applications that accept lower-trust JWS values and rely on joserfc to reject oversized token content during verification have a moderate availability risk. This issue has been fixed in version 1.6.7.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from incomplete input validation in joserfc's RFC7797 unencoded payload (b64=false) processing path. When JWSRegistry.max_payload_length is configured, the library enforces this limit during deserialization for standard JWS compact and flattened JSON formats, raising an ExceededSizeError for oversized content. However, the RFC7797 code path does not perform this same boundary check before accepting and processing the payload. This allows an attacker to construct a valid JWS with b64=false that contains a payload exceeding max_payload_length without triggering validation rejection. The oversized payload remains in memory during verification and processing, creating a resource exhaustion vector.
Business impact
Applications using joserfc to validate and process user-supplied JWS tokens face moderate availability risk if they rely on the library's max_payload_length setting as a defense against resource exhaustion. If an application accepts JWS tokens from lower-trust sources—such as third-party integrations, API clients, or user uploads—attackers can repeatedly submit crafted b64=false tokens to consume memory and degrade or disable service. This risk is most acute in multi-tenant environments, serverless platforms with per-function memory limits, and edge computing scenarios where memory is constrained. Organizations should assess whether their applications enforce JWS payload size restrictions and whether those restrictions are a documented security control.
Affected systems
The vulnerability affects joserfc versions 1.3.4 through 1.6.5. Any Python application that imports and uses joserfc for JWS verification or deserialization is potentially exposed if: (1) the application processes JWS tokens from untrusted sources, (2) JWSRegistry.max_payload_length is configured, and (3) the application does not implement additional upstream payload size checks. Applications using only standard JWS compact or JSON formats without RFC7797 support may have lower practical risk, depending on how the library is invoked. Patched version 1.6.7 is available.
Exploitability
The vulnerability has low barrier to exploitation. An attacker needs only to craft a valid JWS with b64=false and an oversized payload; no special cryptographic material, network access privileges, or complex social engineering is required. The attack can be automated and scaled to target multiple instances in parallel. However, practical impact depends on application design: applications that implement upstream payload size limits, rate-limit token processing, or use memory-bounded execution environments may experience limited effect. No known public exploits or active KEV listing indicate this is not yet widely weaponized, but the straightforward nature of the attack suggests rapid adoption if exploitation code emerges.
Remediation
Upgrade joserfc to version 1.6.7 or later immediately. For applications unable to upgrade promptly, implement compensating controls: validate JWS payload size upstream before passing tokens to joserfc, enforce strict rate limiting on token verification operations per source IP or user, and monitor memory usage for anomalous spikes correlated with JWS processing. Consider restricting acceptance of RFC7797 b64=false tokens if they are not a required feature; consult the application's JWS configuration to disable support if feasible.
Patch guidance
Upgrade the joserfc package to version 1.6.7 or any later release. If your application uses dependency pinning or vendoring, update your lock files and rebuild. Verify the upgrade by checking the version number in your Python environment (python -c "import joserfc; print(joserfc.__version__)") or by reviewing your dependency manifest. Test after upgrade to ensure RFC7797 token handling still works as expected for your use cases; version 1.6.7 introduces stricter validation that should not affect legitimate tokens but may reject previously-undetected oversized payloads.
Detection guidance
Monitor application logs and metrics for: (1) repeated ExceededSizeError exceptions or similar validation failures, which may indicate attempted exploitation; (2) unexpected memory growth or out-of-memory errors correlated with JWS verification activity; (3) HTTP 5xx errors from token validation endpoints. If feasible, instrument joserfc calls to log the b64 parameter and payload size of incoming JWS tokens; oversized b64=false payloads are a strong indicator of exploitation. Network-based detection is limited because the attack payload is encrypted or obscured within the JWS structure, but log analysis of validation failures and resource exhaustion is practical.
Why prioritize this
This vulnerability merits prompt but measured attention. The CVSS 5.3 MEDIUM score reflects limited scope (availability only, no confidentiality or integrity impact) and the requirement that an application must both accept untrusted JWS input and rely on joserfc for size enforcement. However, the ease of exploitation and the direct availability impact make it higher priority than the score alone suggests. Organizations should prioritize patching if they: (1) process JWS from external sources; (2) run joserfc in memory-constrained environments; (3) have documented availability or SLA commitments. Lower priority for applications that are air-gapped, process only trusted JWS, or already enforce upstream payload validation.
Risk score, explained
CVSS 5.3 (MEDIUM) reflects: low attack complexity (no special conditions required), network-based attack vector (any remote user can send a crafted JWS), no privileges or user interaction needed, and limited scope to the confidentiality, integrity, and availability of the affected service. The low-range MEDIUM score acknowledges that impact is availability-only and depends on application-specific reliance on joserfc's max_payload_length control. If an application has already implemented its own payload limits or uses joserfc in a memory-safe container, practical risk is reduced.
Frequently asked questions
Does this vulnerability affect all joserfc users or only those using RFC7797?
The vulnerability affects only applications that: (1) accept JWS tokens with b64=false from untrusted sources, and (2) rely on JWSRegistry.max_payload_length to defend against oversized payloads. If your application does not accept or process RFC7797 b64=false tokens, or if you enforce payload size limits at the application level before calling joserfc, risk is minimal. Check your JWS configuration and input sources to determine exposure.
What is the difference between this and other denial-of-service vulnerabilities?
This is a resource exhaustion vulnerability specific to a code path that was intended to have protective controls but did not enforce them consistently. It differs from algorithmic complexity attacks or network-level DoS in that it requires the attacker to send valid, properly-signed JWS tokens. An organization's ability to detect and mitigate this attack depends on whether they can monitor per-token memory consumption and reject or rate-limit sources sending oversized payloads.
Can I work around this without upgrading?
Yes, implement upstream size validation: before passing any JWS to joserfc, check the unencoded payload or JWT size against your limit and reject oversized tokens. You can also disable RFC7797 support in your application's JWS configuration if b64=false tokens are not required. Rate limit token processing per source and monitor memory usage during validation operations. These measures reduce risk but are not as robust as the patched library.
How do I verify that version 1.6.7 actually fixes this?
Version 1.6.7 applies the same max_payload_length validation to the RFC7797 b64=false code path that was already enforced for standard JWS formats. You can verify by upgrading and re-testing with a crafted oversized b64=false token; the library should now raise ExceededSizeError consistently. Review the joserfc release notes or GitHub repository for the specific commit fixing CWE-400 and CWE-770 in the RFC7797 handler.
This analysis is based on the vulnerability description and public information available as of the publication date. No exploit code or detailed attack steps are provided. Organizations should verify patch availability and compatibility with their specific joserfc deployment before applying updates. Risk assessment should account for your application's specific architecture, input sources, and existing security controls. SEC.co makes no warranty regarding the completeness or accuracy of this analysis and recommends consulting official vendor advisories and your security team for final remediation decisions. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-45031MEDIUMImageMagick PSD Decoder Resource Policy Bypass
- CVE-2026-45664MEDIUMImageMagick MNG Coder Resource Limit Bypass (CVSS 5.3)
- CVE-2026-48187MEDIUMOTRS Email Handler Denial of Service – Uncontrolled Resource Allocation
- CVE-2026-49324MEDIUM2025 Indian Motorcycle Scout Bobber + Tech Immobilizer Lockout Vulnerability
- CVE-2026-12151HIGHundici WebSocket Memory Exhaustion DoS Vulnerability
- CVE-2026-40983HIGHMicrometer gRPC Denial-of-Service Vulnerability
- CVE-2026-40984HIGHMicrometer Denial-of-Service Vulnerability – HTTP Request Handling Flaw
- CVE-2026-44250HIGHNetty Redis Codec Denial-of-Service via Nested Array Memory Exhaustion