CVE-2025-63811 Overview
A resource exhaustion vulnerability has been discovered in the dvsekhvalnov jose2go library, a Go implementation of the JSON Web Encryption (JWE) and JSON Web Signature (JWS) specifications. The vulnerability exists in versions 1.5.0 through 1.7.0 and allows an attacker to cause a Denial-of-Service (DoS) condition by submitting a specially crafted JWE token with an exceptionally high compression ratio—commonly referred to as a "decompression bomb" attack.
Critical Impact
Unauthenticated remote attackers can exhaust server resources and crash applications by sending malicious JWE tokens, potentially disrupting authentication services and APIs that rely on this JWT library.
Affected Products
- dvsekhvalnov jose2go versions 1.5.0 through 1.7.0
- Applications using jose2go for JWT/JWE token processing
- Go applications implementing JWT-based authentication with this library
Discovery Timeline
- 2025-11-12 - CVE-2025-63811 published to NVD
- 2025-12-31 - Last updated in NVD database
Technical Details for CVE-2025-63811
Vulnerability Analysis
This vulnerability is classified as a Resource Exhaustion attack (CWE-400) that exploits the compression handling in JWE token processing. When the jose2go library decompresses JWE payloads, it does not adequately limit the decompression output size relative to the compressed input. An attacker can craft a token with a small compressed payload that expands to an extremely large size during decompression, consuming excessive memory and CPU resources.
The attack is particularly concerning because JWE tokens are typically processed during authentication flows, meaning the vulnerable code path is often exposed to unauthenticated users. This allows attackers to target the availability of authentication services without requiring any credentials.
Root Cause
The root cause of this vulnerability lies in the insufficient validation of compressed content within JWE tokens. The jose2go library supports the DEF (DEFLATE) compression algorithm as specified in RFC 7516 for JWE. However, the implementation fails to impose adequate limits on the decompression ratio or the maximum decompressed size, allowing maliciously crafted tokens with extremely high compression ratios to consume disproportionate system resources during decompression.
Attack Vector
An attacker can exploit this vulnerability remotely over the network without requiring authentication or user interaction. The attack involves:
- Crafting a JWE token with a compressed payload that has an exceptionally high compression ratio
- Sending this malicious token to any endpoint that processes JWE tokens using the vulnerable jose2go library
- The server attempts to decompress the payload, leading to memory exhaustion and potential service disruption
The vulnerability allows for repeated attacks since each malicious request can trigger resource exhaustion independently, making it trivial to maintain a persistent DoS condition against vulnerable services.
Detection Methods for CVE-2025-63811
Indicators of Compromise
- Abnormal memory consumption spikes in applications processing JWT/JWE tokens
- JWE tokens with unusually small encrypted payloads that claim large content sizes
- Service crashes or out-of-memory errors in Go applications handling JWT authentication
- Repeated authentication requests from single sources with anomalous token characteristics
Detection Strategies
- Monitor application memory usage for sudden, unexplained spikes during token processing operations
- Implement logging for JWE token processing that captures compressed versus decompressed sizes
- Deploy application-level rate limiting on endpoints accepting JWT/JWE tokens
- Use Go profiling tools to identify memory allocation patterns during token validation
Monitoring Recommendations
- Set up alerting thresholds for memory utilization in services using jose2go
- Monitor for application restarts or OOM (Out of Memory) kills in container orchestration platforms
- Track latency increases in authentication endpoints that may indicate resource exhaustion
- Review application logs for decompression-related errors or warnings
How to Mitigate CVE-2025-63811
Immediate Actions Required
- Identify all applications in your environment using dvsekhvalnov jose2go versions 1.5.0 through 1.7.0
- Review the GitHub Issue Discussion for the latest patch information and updates
- Implement rate limiting on endpoints that process JWE tokens to reduce attack surface
- Consider implementing input validation to reject JWE tokens that exceed reasonable size thresholds
Patch Information
The vulnerability affects jose2go versions 1.5.0 through 1.7.0. Organizations should monitor the vendor's GitHub repository for updates and patches addressing this vulnerability. Update to a patched version as soon as one becomes available from the maintainer.
To check your current jose2go version, review your Go module dependencies:
# Check jose2go version in your Go project
go list -m github.com/dvsekhvalnov/jose2go
Workarounds
- Implement application-level limits on the maximum size of JWE tokens accepted by your services
- Add timeout controls around token decompression operations to prevent indefinite resource consumption
- Deploy web application firewalls (WAF) with rules to inspect and limit JWT/JWE token sizes
- Consider using an alternative JWT library until a patch is available, if operationally feasible
- Implement resource quotas and memory limits for containers running affected applications
# Example: Setting memory limits for containerized applications
# Docker run with memory constraints
docker run --memory="512m" --memory-swap="512m" your-jwt-application
# Kubernetes resource limits
# Add to your deployment spec:
# resources:
# limits:
# memory: "512Mi"
# requests:
# memory: "256Mi"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


